Indent block continuation different than statement continuation

Our shop uses a convention that continuation lines for blocks (method header, if and while statements, etc.) should be 8 spaces so that the block header is clearly delineated from the block body. Regular statement conditions are 4 spaces.

I'm somewhat tired of having code reviews kicked back at me for indentation issues that are created by the editor (sometimes from automatic reformatting) and not caught by inspection or checkstyle.

Is there any setting, plugin, inspection or other rule so that I can a) prevent this from happening or b) if a is not possible, catch it myself prior to submitting to CR?

Thanks.

0
3 comments

Hi John,

What language are you talking about? As you could notice IDEA has different code style settings for each language.

0
Avatar
Permanently deleted user

In our case the language is Java. Though obviously the format could apply to other languages that have block organization.

0

As far as I know IDEA doesn't have such code style settings for Java. Please file a feature request at issue tracker.

0

Please sign in to leave a comment.