Add checkstyle setup#214
Add checkstyle setup#214krichter722 wants to merge 2 commits intohamcrest:masterfrom krichter722:static-analysis
Conversation
|
Thanks for putting all this effort it. I'm afraid I'm not keen on checkstyle for a small library maintained by a few people. Some of the warnings are useful, but some are not. For example, I think it's fine to have very small methods on a single line. If we wanted to use checkstyle, I would start with a skeleton implementation and add rules incrementally. In the meantime, I tend to rely on Idea's checking. |
|
@sf105 I kept this alive since I'm maintaining a patch of Hamcrest which you refused to merge at some point. I'm providing an update in order to share, not push this PR. I can understand that you want to have your own style. Since most of the work is already done, it's probably easier to go from this patch to create your own rules rather than start your own. As long as you don't enforce a certain code style, you can't control technical debt piling up. Tests take about 10 seconds longer on Travis CI. |
As suggested in #214 the checkstyle setup can be put forward step by step in order to minimize controversy. The start contains a rule to enforce spaces instead of tab characters which are already used in roughly 99.99% of the source.
|
I've merged #217. I'm not keen on this PR, as I think it brings in too much. |
|
That's fine, you can use it to get inspiration for rules to be added step by step. Static analysis is a one way to quality :) |
Requires removal of OpenJDK (or an older checkstyle version which I don't recommend) proposed in #211.