Skip to content

added support for a separate throws indentation configuration #80

merged 1 commit into from Dec 22, 2013

5 participants



This pull request addresses issue #63 (in GitHub). It also addresses the older sourceforge ticket:

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.

Checkstyle member
romani commented Dec 22, 2013

thanks a lot , changes looks simple and obvious.
I am ok to merge, but please fix JavaDoc for class 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?

* <p>
* 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.
* </p>

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.

@isopov isopov merged commit 1ff166e into checkstyle:master Dec 22, 2013

1 check passed

Details default The Travis CI build passed
@PavelSakoun PavelSakoun referenced this pull request in pentaho/pentaho-coding-standards Feb 12, 2014

Add configuration for throws clause indentation #4


@ksclarke Thank you! Found reports on this dated 2008 :)

@ksclarke ksclarke deleted the unknown repository branch Feb 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.