Maven Checkstyle Plugin
  1. Maven Checkstyle Plugin

CheckstyleViolationCheckMojo: More flexible checkstyle:check-inflicted build failures


    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: checkstyle:check
    • Labels:
    • Flags:


      Hey guys,
      first of all let me thank you for the wonderful job that you all do. Our company's build process has rocketed a century forward after we replaced Ant with Maven.

      We're currently trying to migrate from Maven1 to Maven2. We have a Jelly goal in our old M1 build that does similar job to "checkstyle:check" in M2, but it verifies that a project does not have more than X Checkstyle Errors and Y Checkstyle Warnings. That was not entirely possible to configure with M2, where one can choose to fail the build on more than 0 Errors or Warnings, where 0 is not a configurable value in contrast with X and Y.

      I have scribbled several changes in


      where I basically replaced the parameter violationSeverity with 3 new parameters (maxErrors, maxWarnings, maxInfos) allowing the user a more flexible configuration of checkstyle-inflicted build failures.

      Example :
      The configuration


      will fail the build of a project that has more than 0 Checkstyle Errors or more than 100 Checkstyle Warnings.

      If you find such the feature useful and want to include it in some of the next releases of maven-checkstyle-plugin I will be happy to do the additional Documentation/Test Cases.

        Issue Links


          Kaloyan Enimanev created issue -
          Dennis Lundberg made changes -
          Field Original Value New Value
          Link This issue relates to MCHECKSTYLE-113 [ MCHECKSTYLE-113 ]
          Hervé Boutemy made changes -
          Component/s checkstyle:check [ 16597 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:17:21 UTC 2015 [ 1428225441187 ]
          Mark Thomas made changes -
          Workflow jira [ 12718284 ] Default workflow, editable Closed status [ 12749564 ]
          Mark Thomas made changes -
          Patch Submitted Yes [ 10763 ]
          Flags Patch [ 10430 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:43:44 UTC 2015 [ 1428273824526 ]
          Mark Thomas made changes -
          Workflow jira [ 12955653 ] Default workflow, editable Closed status [ 12992527 ]


            • Assignee:
              Kaloyan Enimanev
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: