You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ben M. (Jira)" <ji...@apache.org> on 2019/12/12 09:51:00 UTC

[jira] [Created] (MCHECKSTYLE-385) Violation should be a value class

Ben M. created MCHECKSTYLE-385:
----------------------------------

             Summary: Violation should be a value class
                 Key: MCHECKSTYLE-385
                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-385
             Project: Maven Checkstyle Plugin
          Issue Type: Improvement
          Components: checkstyle:check
    Affects Versions: 3.1.0
         Environment: Any (Linux, Window OS, etc.)
            Reporter: Ben M.


Dear developers,

while starting to implement the feature https://issues.apache.org/jira/browse/MCHECKSTYLE-356, I found out that a refactoring is needed.

 

The method {color:#403294}{{int countViolations(Parser)}}{color} does so many things besides counting violations. Some of them are:
 * checking, if printing violations is wanted.
 * actually printing violations
 * counting violations
 * counting ignored violations
 * checking ignored violations count > 0 and logging
 * Keeping track of file changes

I would like to rework this part of the code with no functional changes by creating a "Violation" value class.

PR follows.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)