fix/refactor checkstyle

Review Request #1432 - Created Dec. 5, 2014 and submitted

Information
Jin Feng
pants
fa8e473...
Reviewers
pants-reviews
benjyw, ity, jsirois, tejal, zundel

- Renaming BUILD.tools's twitter-checkstyle target to checkstyle since this is not
twitter specific
- Adding build-support/checkstyle/* to wire up the checkstyle
- A few longer than 100-character per line java files fixes
- pants.ini, fix/change broken [checkstyle] to [compile.checkstyle]
- pants.ini remove suppression_files setting:
There are a cuople reasons for doing this:
1) OS pants and com.puppycrawl.tools.checkstyle only supports single suppression file.
  The multiple suppresion files concept is from a Twitter internal custom filter, which
  isn't applicable here.
2) But more important, suppression isn't a required component for running checkstyle.
  Someone can perfectly author a coding_style.xml which contains no SuppressionFilter
  filter. And right now the checkstyle internally reads suppression_files list and injects
  them into the properties, which assuming the hardcoded SuppressionFilter. Doesn't make
  any sense. Anyone wants to use suppression, can still put checkstyle.suppression.file
  into properties setting under [compile.checkstyle] in OS pants, or any company specific
  pants.ini
- Adding the checkstyle task into the optional backend so when we run PANTS_DEV=1 ./pants
in OS pants, it's added, however, it's not by default wired up in pants release. Anyone
can still wire it up in their own wrapper (like what Twitter currently does)
- In ide_gen, currently it tries to read suppression_files from [checkstyle]. First, like
I mentioned above, the default open source checkstyle doesn't have multiple suppression
files concept. Second, the current setting points to an invalid file that doesn't exist
anyway. So instead, I'm setting it to [] for now and will follow up with ide/idea owners
later.
- Adding unit tests for checkstyle to prevent future regressions.

Merge branch 'master' of github.com:jinfeng/jinfeng-pants-fork into jin_add_checkstyle_to_optional_backend

PANTS_DEV=1 ./pants goal compile examples/src/java::
PANTS_DEV=1 ./pants goal test tests/python/pants_test/backend/jvm/tasks:checkstyle

Travis baking:
https://travis-ci.org/jinfeng/jinfeng-pants-fork/builds/43051952

Issues

  • 0
  • 5
  • 0
  • 5
Description From Last Updated
Eric Ayers
Eric Ayers
Patrick Lawson
Ity Kaul
John Sirois
Jin Feng
Jin Feng
John Sirois
Jin Feng
David Turner
David Turner
Ity Kaul
Jin Feng
Review request changed

Status: Closed (submitted)

Loading...