maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Boué (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well
Date Sat, 03 Jun 2017 19:39:04 GMT

    [ https://issues.apache.org/jira/browse/MCHECKSTYLE-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036068#comment-16036068
] 

Guillaume Boué commented on MCHECKSTYLE-337:
--------------------------------------------

Thanks! The patch must be a few months old because it doesn't apply anymore with the latest
codebase. Could you bring it up to date?

I've looked at the diff and it looks good. If you could also add an integration test with
{{plain}} output format, that, for example, verifies the checkstyle plain result was generated,
it would be great (they are under {{src/it}}, where there are example, and are run when building
the project with the {{run-its}} profile).

I like the idea between {{CompositeAuditListener}}, that can be useful to factor out some
more code in the plugin.

> checkstyle:check only supports xml output format, but the docs say it supports plain
as well
> --------------------------------------------------------------------------------------------
>
>                 Key: MCHECKSTYLE-337
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-337
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>          Components: checkstyle:check
>    Affects Versions: 2.17
>            Reporter: Stig Rohde Døssing
>            Priority: Minor
>         Attachments: MCHECKSTYLE-337.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message