[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-06-04 Thread Hudson (JIRA)

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

Hudson commented on MCHECKSTYLE-337:


SUCCESS: Integrated in Jenkins build maven-plugins #8983 (See 
[https://builds.apache.org/job/maven-plugins/8983/])
[MCHECKSTYLE-337] checkstyle:check only supports xml output format, but the 
docs say it supports plain as well
Submitted by: Stig Rohde Døssing

Adding support for 'plain' output file format in the 'check' goal. It is still 
not possible to use it in combination with 'skipExec' because the plain format 
does not interact fully with 'violationIgnore' (which can contain fully 
qualified class name, when Checkstyle plain format only has the class simple 
name). (gboue: [http://svn.apache.org/viewvc/?view=rev=1797596])
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/invoker.properties
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/pom.xml
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src/main
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src/main/java
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src/main/java/org
* (add) 
maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src/main/java/org/MyClass.java
* (add) 
maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/src/main/java/org/package-info.java
* (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-337/verify.groovy
* (edit) 
maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
* (add) 
maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CompositeAuditListener.java
* (edit) 
maven-checkstyle-plugin/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojoTest.java
* (add) 
maven-checkstyle-plugin/src/test/plugin-configs/check-plugin-plain-output.xml


> 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, MCHECKSTYLE-337.patch, 
> 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-06-04 Thread JIRA

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

Guillaume Boué commented on MCHECKSTYLE-337:


Thanks for the patch! Applied in 
[r1797596|http://svn.apache.org/viewvc?rev=1797596=rev].

> 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, MCHECKSTYLE-337.patch, 
> 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-06-04 Thread JIRA

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

Guillaume Boué commented on MCHECKSTYLE-337:


[~Srdo] It seems you attached the same patch as before.

> 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, 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-06-01 Thread JIRA

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

Stig Rohde Døssing commented on MCHECKSTYLE-337:


I have a solution working where an extra XML file is generated in the tmpdir if 
the outputFileFormat isn't {{xml}}. How do I put it up for review? (I'm more 
familiar with git where this would be done via PR)

> 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
>
> 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-05-31 Thread JIRA

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

Guillaume Boué commented on MCHECKSTYLE-337:


Outputting a plain file and a XML file in case of {{plain}} sounds good. The 
temporary XML file (generated in {{java.io.tmpdir}} for example) can be deleted 
by the goal when it has finished. No need to change anything for {{xml}}. This 
way, the current restriction of "reject {{plain}}" can be loosened to "reject 
{{plain}} only if {{skipExec}} is {{true}}".

> 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
>
> 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-05-28 Thread JIRA

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

Stig Rohde Døssing commented on MCHECKSTYLE-337:


The first option would be to remove the requirement to use xml output by 
counting errors with an AuditListener, and not reading the output file at all. 
This removes the restriction on output file format, because the plugin doesn't 
need to be able to parse the report. By "break support for {{skipExec}}", I 
meant you wouldn't be able to run the check goal to generate the report, 
followed by running check again with {{skipExec}} to verify that there were no 
errors. The report parsing code would also need to only run when {{skipExec}} 
is set, otherwise the plugin would be using the AuditListener to count errors 
instead. 

I don't think it makes sense to modify the {{plain}} output to fit the plugin. 
I'd much rather have the plugin output two result files. The plugin could 
output an XML file always, plus the "normal" result file ({{xml}} or 
{{plain}}). That way the plugin has an XML file to read from, but users can get 
a {{plain}} format file for humans to read.

> 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
>
> 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)


[jira] [Commented] (MCHECKSTYLE-337) checkstyle:check only supports xml output format, but the docs say it supports plain as well

2017-05-27 Thread JIRA

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

Guillaume Boué commented on MCHECKSTYLE-337:


I'm not sure why the first option would break support for {{skipExec}}. But I 
don't think the {{plain}} output format can be supported as-is with [Checkstyle 
definition of 
"plain"|http://checkstyle.sourceforge.net/cmdline.html#Command_line_usage]... 
The log messages produced by {{DefaultLogger}} does not include the fully 
qualified name of the check's class (only the simple name), and so it wouldn't 
work in combination with {{violationIgnore}}. We could have our own formatter 
for the messages, but then using {{skipExec}} on a result produced by 
Checkstyle could possibly not be interpreted correctly.

> 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
>
> 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)