[
https://issues.apache.org/jira/browse/FLINK-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418303#comment-15418303
]
ASF GitHub Bot commented on FLINK-3870:
---------------------------------------
Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/1963#discussion_r74537594
--- Diff: tools/FlinkCodeStyle.xml ---
@@ -0,0 +1,75 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<code_scheme name="Flink">
+ <option name="LINE_SEPARATOR" value="
" />
+ <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+ <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+ <option name="RIGHT_MARGIN" value="100" />
+ <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
+ <ScalaCodeStyleSettings>
+ <option name="NOT_CONTINUATION_INDENT_FOR_PARAMS" value="true" />
+ <option name="DO_NOT_ALIGN_BLOCK_EXPR_PARAMS" value="true" />
+ <option name="INDENT_BRACED_FUNCTION_ARGS" value="false" />
+ </ScalaCodeStyleSettings>
+ <codeStyleSettings language="JAVA">
+ <option name="RIGHT_MARGIN" value="100" />
+ <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
+ <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION" value="true" />
+ <option name="CALL_PARAMETERS_WRAP" value="5" />
+ <option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="METHOD_PARAMETERS_WRAP" value="5" />
+ <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="RESOURCE_LIST_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ <option name="ENUM_CONSTANTS_WRAP" value="5" />
+ <indentOptions>
+ <option name="SMART_TABS" value="true" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="Scala">
+ <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
--- End diff --
How about not align multiline chained methods?
It will align like this:
```scala
fieldNames
.zip(fieldTypes)
.foreach(...
```
> Add IntelliJ code style file
> ----------------------------
>
> Key: FLINK-3870
> URL: https://issues.apache.org/jira/browse/FLINK-3870
> Project: Flink
> Issue Type: New Feature
> Components: Documentation
> Reporter: Dawid Wysakowicz
> Assignee: Dawid Wysakowicz
>
> Attach intellij code style file to code base and reference it from How to
> contribute site.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)