| # 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 |
| # |
| # https://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. |
| |
| # Configuration here must match the one for Spotless in `pom.xml`! |
| |
| root = true |
| |
| [*] |
| indent_size = 4 |
| ij_continuation_indent_size = 8 |
| indent_style = space |
| trim_trailing_whitespace = true |
| |
| # `ij_any_use_relative_indents = true` is deliberately left out since it messes up the indentation in ternary operator usages |
| |
| # Split some things over multiple lines to keep lines short |
| ij_any_call_parameters_wrap = on_every_item |
| ij_any_method_parameters_wrap = on_every_item |
| ij_any_method_call_chain_wrap = on_every_item |
| |
| # Don't align with the first line to avoid single-line changes having an impact in the rest of the code |
| ij_any_align_multiline_parameters_in_calls = false |
| ij_any_align_multiline_parameters = false |
| ij_any_align_multiline_chained_methods = false |
| |
| # Only use `import *` when importing 5 or more |
| ij_java_names_count_to_use_import_on_demand = 5 |
| ij_java_class_count_to_use_import_on_demand = 5 |
| |
| # Order imports |
| # `*` denotes any packages except explicitly specified ones |
| # `|` denotes a blank line |
| # `$` denotes the prefix for static packages |
| # `**` means including subpackages |
| ij_java_imports_layout = java.**, |, javax.**, |, org.apache.logging.**, |, *, |, $java.**, |, $javax.**, |, $org.apache.logging.**, |, $* |
| |
| # Force curly braces |
| ij_any_for_brace_force = always |
| ij_any_if_brace_force = always |
| ij_any_do_while_brace_force = always |
| ij_any_while_brace_force = always |
| |
| # Don't align parameters and exceptions in javadoc based on the longest names to avoid single-line changes having an impact in the rest of the code |
| ij_java_doc_align_param_comments = false |
| ij_java_doc_align_exception_comments = false |
| |
| [*.{xml,xsd,properties,yml,yaml,json}] |
| indent_size = 2 |
| |
| [*.{md,adoc}] |
| indent_size = 2 |
| ij_any_wrap_long_lines = false |
| # The `no` value doesn't work in IntelliJ IDEA so a big number does the trick as well in most cases: |
| max_line_length = 9999 |