You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Johan Andrén (JIRA)" <ji...@codehaus.org> on 2009/10/28 10:08:27 UTC

[jira] Created: (MPMD-109) Class name not printed in pmd:check output

Class name not printed in pmd:check output
------------------------------------------

                 Key: MPMD-109
                 URL: http://jira.codehaus.org/browse/MPMD-109
             Project: Maven 2.x PMD Plugin
          Issue Type: Improvement
          Components: PMD
    Affects Versions: 2.4
            Reporter: Johan Andrén


When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.

Example output:
[pmd:check]
PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Nick Stolwijk (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196397#action_196397 ] 

Nick Stolwijk commented on MPMD-109:
------------------------------------

I have found the problem.

The pmd plugin just parsed the xml file and prints the packagename + class found in the xml file. [1] The pmd file does not contain class for rules which are above class level. [2] It is not something the pmd plugin can solve. Your rule sees the whole class as "wrong", maybe you can change your rule to see a specific line as wrong.

[1] http://svn.apache.org/viewvc/maven/plugins/tags/maven-pmd-plugin-2.4/src/main/java/org/apache/maven/plugin/pmd/PmdViolationCheckMojo.java?view=markup line 89
[2] http://pmd.svn.sourceforge.net/viewvc/pmd/tags/pmd/pmd_release_4_2_2/src/net/sourceforge/pmd/RuleViolation.java?revision=6135&view=markup line 77

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Johan Andrén (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196398#action_196398 ] 

Johan Andrén commented on MPMD-109:
-----------------------------------

I see. Thank you very much and sorry for taking your time with a non-bug.

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Johan Andrén (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196389#action_196389 ] 

Johan Andrén commented on MPMD-109:
-----------------------------------

I have checked. Putting the rule violation in a field declaration, a constructor and a static method all yields the same result with no classname.

The problem is only in the maven plugin stdout output. In the pmd-file the entire class names are written.

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Nick Stolwijk (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196375#action_196375 ] 

Nick Stolwijk commented on MPMD-109:
------------------------------------

I haven't looked at the code yet, but could it be that those warnings are from anonymous inner classes?

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Johan Andrén (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196371#action_196371 ] 

Johan Andrén commented on MPMD-109:
-----------------------------------

Looking a bit closer at the output i see that the last failure line actually has the classname in it.

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Johan Andrén (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196370#action_196370 ] 

Johan Andrén commented on MPMD-109:
-----------------------------------

Our  configuration block from the pom:

 <configuration>
                        <targetJdk>1.6</targetJdk>
                        <sourceEncoding>UTF-8</sourceEncoding>
                        <verbose>true</verbose>
                        <rulesets>
                            <ruleset>/se/databyran/general-required.xml</ruleset>
                            <!-- our own rulesets -->
                            <ruleset>/se/databyran/prosang/nbmmoduleruleset.xml</ruleset>
                        </rulesets>
                    </configuration>

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Nick Stolwijk (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196392#action_196392 ] 

Nick Stolwijk commented on MPMD-109:
------------------------------------

The plugin doesn't do anything else then parse the pmd.xml, but you say the classname is in there. Can you post a snippet of your pmd.xml?

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MPMD-109) Class name not printed in pmd:check output

Posted by "Johan Andrén (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=196393#action_196393 ] 

Johan Andrén commented on MPMD-109:
-----------------------------------

Not the exact pmd.xml from above, I hope it is enough help, the previous pmd-violations has been fixed already:

<?xml version="1.0" encoding="UTF-8"?>
<pmd version="4.2.4" timestamp="2009-10-28T11:07:05.940">
<file name="/Users/johan/NetBeansProjects/prosang/trunk/client/admin/settings/src/main/java/se/databyran/prosang/client/admin/settings/definition/PresentationModel.java">
<violation beginline="38" endline="716" begincolumn="1" endcolumn="1" rule="NoLocalDates" ruleset="Client module ruleset" package="se.databyran.prosang.client.admin.settings.definition" priority="3">
All dates used must be fetched from the server via the ApplicationSession.currentDate() (you may not use client dates since the client might have incorrect time set)
</violation>
</file>
<file name="/Users/johan/NetBeansProjects/prosang/trunk/client/admin/settings/src/main/java/se/databyran/prosang/client/admin/settings/definition/SimpleDefinitionTableFormat.java">
<violation beginline="14" endline="113" begincolumn="1" endcolumn="1" rule="NoLocalDates" ruleset="Client module ruleset" package="se.databyran.prosang.client.admin.settings.definition" priority="3">
All dates used must be fetched from the server via the ApplicationSession.currentDate() (you may not use client dates since the client might have incorrect time set)
</violation>
</file>
</pmd>

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Closed: (MPMD-109) Class name not printed in pmd:check output

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MPMD-109.
------------------------------

       Resolution: Duplicate
    Fix Version/s: 2.5
         Assignee: Herve Boutemy

> Class name not printed in pmd:check output
> ------------------------------------------
>
>                 Key: MPMD-109
>                 URL: http://jira.codehaus.org/browse/MPMD-109
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Johan Andrén
>            Assignee: Herve Boutemy
>             Fix For: 2.5
>
>
> When we get pmd:check failures only package name and line is printed. It would be very nice to get class name as well.
> Example output:
> [pmd:check]
> PMD Failure: se.databyran.prosang.client.core.util.form.dialogs.13 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.gui.62 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.44 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.
> PMD Failure: se.databyran.prosang.client.core.util.search.FinderDialog:70 Rule:AutoGenerateMnemonicsRequired Priority:3 All forms and panels must have the 'auto generate mnemonics' property set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira