This pull request addresses issue #63 (in GitHub). It also addresses the older sourceforge ticket: http://sourceforge.net/p/checkstyle/feature-requests/294/
It gives you the ability to define a separate indentation for "throws". It's mostly not my code, but Maikel Steneker's (@maikelsteneker). Maikel had forked the original checkstyle repo and added support for a separate throws indentation (and then made it available on GitHub). I found Maikel's repo awhile back and have been using it. It works great with Maven and Eclipse.
I just added a unit test to what Maikel had already created and set up this branch so that I could submit it as a pull request since checkstyle development is picking up again. I think this should be an easy merge?
Thanks for looking into it.
added support for a separate throws indentation configuration
thanks a lot , changes looks simple and obvious.
I am ok to merge, but please fix JavaDoc for class IndentationCheck.java to add new field to it.
@isopov, please take a look.
Great. I'm not sure where you mean to fix the JavaDoc though. Do you mean to add something to the below?
* The basic idea behind this is that while
* pretty printers are sometimes convenient for bulk reformats of
* legacy code, they often either aren't configurable enough or
* just can't anticipate how format should be done. Sometimes this is
* personal preference, other times it is practical experience. In any
* case, this check should just ensure that a minimal set of indentation
* rules are followed.
The field has a javadoc:
/** how far throws should be indented when on next line */
private int mThrowsIndentationAmount = DEFAULT_INDENTATION;
Thanks for clarifying.
Thank you both for your efforts. I've been using my own build of checkstyle to be able to use this little extra, but it would be great to get it in the main release.
@ksclarke Thank you! Found reports on this dated 2008 :)