Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why checkstyle sometimes uses wrong config #80

Closed
ljleppan opened this issue Sep 5, 2015 · 1 comment
Closed

Figure out why checkstyle sometimes uses wrong config #80

ljleppan opened this issue Sep 5, 2015 · 1 comment

Comments

@ljleppan
Copy link
Member

ljleppan commented Sep 5, 2015

When running tests on the project, checkstyle also runs. Sometimes, checkstyle prints out a bazillion lines about incorrect indentation. It seems that this is caused by checkstyle not finding the .xmlconfig file specified in pom.xml and defaulting to use the built-in sun_checks.xml that is drastically different than our own checkstyle configs.

This causes two issues:

  1. It's really annoying when your console is flooded with text after a test run
  2. Travic CI auto-stops the build after 4 Mb of logs. This checkstyle issue causes our logs to be over this limit and therefore the build fails even if there's no "real" issue with the code being ran.

A possible hint towards solving this problem:

On my computer, if I run mvn clean test, I get the bazillion lines of text. If afterwards I run mvn test (NB: no clean), then the correct checkstyle config is applied and no extraneous errors are shown. My theory is that for some reason, checkstyle is looking for the config in /target instead of in root, and that the config is copied to /target only after the first run completes. This theory is corroborated by the fact that if I run mvn clean test twice, both runs show the incorrect warnings.

If you'd like more info, ping loezi in IRC or comment here.

@wakr
Copy link
Contributor

wakr commented Sep 10, 2015

I can take this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants