You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Tarocchi (Jira)" <ji...@apache.org> on 2020/02/12 15:28:00 UTC
[jira] [Commented] (CAMEL-14540) Change the switch/case indentation
sourcecheck policy
[ https://issues.apache.org/jira/browse/CAMEL-14540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17035444#comment-17035444 ]
Andrea Tarocchi commented on CAMEL-14540:
-----------------------------------------
[~davsclaus] [~acosentino] WDYT?
> Change the switch/case indentation sourcecheck policy
> -----------------------------------------------------
>
> Key: CAMEL-14540
> URL: https://issues.apache.org/jira/browse/CAMEL-14540
> Project: Camel
> Issue Type: Improvement
> Reporter: Andrea Tarocchi
> Priority: Major
>
> Since recently I have been playing with our sourcheck to hook it in as a GitHub action at each PR, I have been fixing some sourcecheck findings leftover from previous unchecked commits.
> Most of the stuff makes sense but this one:
> {code:xml}
> // Some comments here
> <module name="Indentation">
> <property name="lineWrappingIndentation" value="0"/>
> <property name="caseIndent" value="0"/>
> </module>
> {code}
> this impose that switch/case blocks should be in the form of:
> {code:java}
> switch(...) {
> case:
> ...
> case:
> ...
> case:
> ...
> default:
> }
> {code}
> i.e. {{switch}} and {{case}} keywords MUST have the same indentation. I have searched a little bit and it seems this is not widely used as a code style, the tendency is to have the {{case}} indented.
> Since there are 2053 occurrences of switch/case blocks, before attempting to fix this I would like a general agreement on this.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)