Menu

#1079 Exclude pattern does not work

Eclipse-Plugin
closed
None
Eclipse
3-Major
Bug
2014-04-21
2013-04-05
Val
No

Steps to reproduce:

  1. Create a Java class that should produce a warning, for example "com.MyBadClass"
  2. In the ruleset file specify:
  <exclude-pattern>.*/com/MyBadClass.*</exclude-pattern>
  <exclude-pattern>.*/com/.*</exclude-pattern>
  1. The warning is shown for the MyBadClass.
1 Attachments

Discussion

  • Andreas Dangel

    Andreas Dangel - 2013-04-05

    Hi,
    I tried to reproduce the bug, but I couldn't (with PMD 5.0.1/5.0.2).
    Which version of PMD were you using?

    Can you try out the attached project? Simply unzip it and adjust the path in run-pmd.sh (or run-pmd.bat) and run it. Does it detect the JumbledIncrementor violation for you?
    Or can you adjust this project, so that you can reproduce the issue?

    Thanks,
    Andreas

     
    • Val

      Val - 2013-04-05

      I used pmd-5.1.0-SNAPSHOT.jar from net.sourceforge.pmd.eclipse.plugin_4.0.0.201211080927.jar.

       
  • Andreas Dangel

    Andreas Dangel - 2013-04-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,10 @@
     Steps to reproduce:
    
     1. Create a Java class that should produce a warning, for example "com.MyBadClass"
     2. In the ruleset file specify:
    -  &lt;exclude-pattern&gt;.*/com/MyBadClass.*&lt;/exclude-pattern&gt;
    -  &lt;exclude-pattern&gt;.*/com/.*&lt;/exclude-pattern&gt;
    +
    +~~~~~
    +  <exclude-pattern>.*/com/MyBadClass.*</exclude-pattern>
    +  <exclude-pattern>.*/com/.*</exclude-pattern>
    +~~~~~
    +
     3. The warning is shown for the MyBadClass.
    
    • status: open --> more-info-needed
    • assigned_to: Andreas Dangel
     
  • Andreas Dangel

    Andreas Dangel - 2013-04-05
    • status: more-info-needed --> accepted
    • module: PMD --> Eclipse
    • milestone: New Tickets --> Eclipse-Plugin
     
  • Andreas Dangel

    Andreas Dangel - 2013-04-05

    Alright - I move this bug to the eclipse module. PMD itself seems to be fine.

     
  • Andreas Dangel

    Andreas Dangel - 2013-08-10
    • status: accepted --> in-progress
     
  • Andreas Dangel

    Andreas Dangel - 2013-08-11
    • status: in-progress --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB