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

checkstyle:check only supports xml output format, but the docs say it supports plain as well

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.17
    • 3.0.0
    • checkstyle:check
    • None

    Description

      The documentation for the check goal at https://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html#outputFileFormat mentions "plain" as a valid option for file output. This is not true, the mojo only supports XML.

      I'd prefer added support for plain output, but the docs should be fixed if that is not possible.

      Taking a look at the code, it looks like the only reason plain isn't supported is because the check mojo needs to parse the output file to figure out if there were style violations. An option would be counting errors with the AuditListener instead, but this would break support for skipExec. An alternative would be to output an extra XML result file if the output format isn't XML.

      I'd be happy to implement either solution.

      Attachments

        1. MCHECKSTYLE-337.patch
          19 kB
          Stig Rohde Døssing
        2. MCHECKSTYLE-337.patch
          11 kB
          Stig Rohde Døssing
        3. MCHECKSTYLE-337.patch
          11 kB
          Stig Rohde Døssing

        Activity

          People

            gboue Guillaume Boué
            srdo Stig Rohde Døssing
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: