17. Managing Violations
• For Each violation You Can
•
•
•
•
•
Comment
Change its severity
Declare it as a false-positive
Assign it to someone
Assign it to an action plan
19. What now
• What to Start With
• Check violations for your project
• Remove duplicate code
• Improve test coverage
Hinweis der Redaktion
Blocker = number of PMD blocker issuesCritical = number of PMD critical issuesMajor = number of PMD major issuesMinor = number of PMD minor issuesInfo = number of PMD info issues
Blocker = number of PMD blocker issuesCritical = number of PMD critical issuesMajor = number of PMD major issuesMinor = number of PMD minor issuesInfo = number of PMD info issues
Blocker = number of PMD blocker issuesCritical = number of PMD critical issuesMajor = number of PMD major issuesMinor = number of PMD minor issuesInfo = number of PMD info issuesCyclomatic ComplexityThe Cyclomatic Complexity is measured by the number of (&&, ||) operators and (if, while, do, for, ?:, catch, switch, case, return, throw) statements in the body of a class plus one for each constructor, method (but not getter/setter), static initializer, or instance initializer in the class. The last return stament in method, if exists, is not taken into account.Even when the Cyclomatic Complexity of a class is very high, this complexity might be well distributed among all methods. Nevertheless, most of the time, a very complex class is a class which breaks the Single Responsibility Principle and which should be re-factored to be split in several classes.
Blocker = number of PMD blocker issuesCritical = number of PMD critical issuesMajor = number of PMD major issuesMinor = number of PMD minor issuesInfo = number of PMD info issues
Blocker = number of PMD blocker issuesCritical = number of PMD critical issuesMajor = number of PMD major issuesMinor = number of PMD minor issuesInfo = number of PMD info issues