Skip to content

Commit

Permalink
Enforce the import order consistent with the project policy (#1355)
Browse files Browse the repository at this point in the history
### What's done:

 * As of now, there's the following order of imports:
 
   * `android.*`, `androidx.*`, `com.android.*`,
   * `org.cqfn.diktat.*`,
   * all other imports,
   * `java.*`, `javax.*`,
   * `kotlin.*`, `kotlinx.*`.

 * Additionally, `kotlin.code.style` property set to `official` in `pom.xml`.
 * See <https://kotlinlang.org/docs/code-style-migration-guide.html#in-maven> for more details.
  • Loading branch information
0x6675636b796f75676974687562 authored Jun 10, 2022
1 parent b12c685 commit 65335c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ij_kotlin_field_annotation_wrap = split_into_lines
ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = true
ij_kotlin_import_nested_classes = false
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_imports_layout = android.**,androidx.**,com.android.**,org.cqfn.diktat.**,*,java.**,javax.**,kotlin.**,kotlinx.**,^
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 2
ij_kotlin_keep_blank_lines_in_code = 2
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.6.21</kotlin.version>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<kotlin.code.style>official</kotlin.code.style>
<kotlinx.serialization.version>1.3.3</kotlinx.serialization.version>
<ktlint.version>0.45.2</ktlint.version>
<junit.version>5.8.2</junit.version>
Expand Down

0 comments on commit 65335c7

Please sign in to comment.