Skip to content

Conversation

@HeartSaVioR
Copy link
Contributor

@HeartSaVioR HeartSaVioR commented May 23, 2017

Because of output log size policy for Travis CI, we can't print violation report to the console. Instead of that, we can just leave violation to the file.

This would help to track and fix checkstyle violations.

@HeartSaVioR
Copy link
Contributor Author

Btw I don't like xml representation but when I set output format to plain, checkstyle plugin complains.
Output format is 'plain', checkstyle:check requires format to be 'xml'

@srdo
Copy link
Contributor

srdo commented May 23, 2017

+1

The check goal doesn't currently support "plain" output, the documentation is wrong. http://svn.apache.org/viewvc/maven/plugins/tags/maven-checkstyle-plugin-2.17/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java?view=markup#l556

It's because the plugin writes the checkstyle results to disk, then parses them back up again to figure out if there were any rule violations so it can fail the build. The parsing code only understands XML.

@revans2
Copy link
Contributor

revans2 commented May 23, 2017

+1

Although I think this is already happening. As a part of #2113 I added in an xslt script to make reading the XML format better (like plain) and a python script to help search through it to help do things like look at violations only for files I touched with this patch.

@asfgit asfgit merged commit d370c5e into apache:master May 25, 2017
@HeartSaVioR HeartSaVioR deleted the quickfix-log-checkstyle-violation-to-output-file branch June 29, 2017 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants