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

Violation should be a value class

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: checkstyle:check
    • Environment:
      Any (Linux, Window OS, etc.)

      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

              • Assignee:
                Unassigned
                Reporter:
                bmarwell Benjamin Marwell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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