Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-385

Violation should be a value class

    XMLWordPrintableJSON

Details

    Description

      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 int countViolations(Parser) 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.

      Attachments

        Issue Links

          Activity

            People

              bmarwell Benjamin Marwell
              bmarwell Benjamin Marwell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m