diff --git a/.gitignore b/.gitignore index b234d6bc5..1ad5f381a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,8 @@ src/common/scm_rev.cpp *.swp *.kdev4 .markdown-preview.html -.idea/ +.idea/* +!.idea/inspectionProfiles .vs/ .vscode/ .cache/ diff --git a/src/android/.editorconfig b/src/android/.editorconfig new file mode 100644 index 000000000..233c261c3 --- /dev/null +++ b/src/android/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*.{kt,kts}] +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL +ktlint_code_style = android_studio + +# Disable wildcard imports +ij_kotlin_name_count_to_use_star_import = 2147483647 +ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 +ij_kotlin_packages_to_use_import_on_demand = unset + +# Style configuration +indent_size = 4 +indent_style = space +ktlint_standard_package-name = disabled +max_line_length = 100 \ No newline at end of file diff --git a/src/android/.gitignore b/src/android/.gitignore index 40b6c5cd0..992701e0e 100644 --- a/src/android/.gitignore +++ b/src/android/.gitignore @@ -34,7 +34,8 @@ captures/ # IntelliJ *.iml -.idea/ +.idea/* +!.idea/inspectionProfiles # Keystore files # Uncomment the following line if you do not want to check your keystore files in. diff --git a/src/android/.idea/inspectionProfiles/Project_Default.xml b/src/android/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 000000000..2bf207346 --- /dev/null +++ b/src/android/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/tools/check-kotlin-formatting.sh b/tools/check-kotlin-formatting.sh new file mode 100755 index 000000000..666d97e4e --- /dev/null +++ b/tools/check-kotlin-formatting.sh @@ -0,0 +1 @@ +cd ./src/android/ && ktlint --color '!./app/build/generated/**'