Menu

#1231 No Error Message on Missing Rule

PMD-5.1.3
closed
PMD
3-Major
Bug
5.1.2
2014-08-31
2014-07-30
No

If I run PMD from the command-line and mistype a ruleset, e.g. "java-designn" or "java-designn/UseCollectionIsEmpty" instead of "java-design" or "java-design/UseCollectionIsEmpty", it prints out exception data.

If I mistype the rule itself, e.g. "java-design/UsCollectionIsEmpty", however, it simply doesn't use the rule and prints no error message to say that it is being ignored. This is particularly problematic since it can appear as though the report was done and no issues were found, when in fact no issues were found because the rule was not used.

It also does not issue an error message if an excluded rule's name is misspelled in referencing a ruleset. This can, of course, lead to that rule's violations still showing up in the report, so it is indirectly detectable.

For comparison, it does issue an error message (and a much cleaner one than the exception thrown for misspelling a ruleset) if a specific referenced rule is misspelled. I would expect this sort of message in all four of these cases and not just this one.

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-08-13
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-next
     
  • Andreas Dangel

    Andreas Dangel - 2014-08-13

    This will be fixed with the next release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.