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

Add logViolationCountToConsole property

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.1.1
    • checkstyle:check
    • None

    Description

      The plugin is missing a property to allow users to log the violation count to console.

      There are already a couple of places where the violation count may be logged, but it doesn't happen unconditionally. The DefaultCheckstyleExecutor may log the error count, but only if there are error-severity violations. The CheckstyleViolationCheckMojo.countViolations method may log the violation count, but only if there are ignored violations.

      It would be nice if a logViolationCountToConsole property were added. Printing the violation count is convenient in cases where e.g. you have fixed some violations in a project and now want to reduce maxAllowedViolations. Currently you have to either manually count the violations from the report, or set maxAllowedViolations to 0 to get the plugin to fail and print the violation count.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srdo Stig Rohde Døssing
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 20m
                  20m