Add Kotlin code formatting/style configuration files

This commit is contained in:
OpenSauce04 2026-06-14 20:26:57 +01:00 committed by OpenSauce
parent b4bda9d7f5
commit a2a20fcc65
5 changed files with 35 additions and 2 deletions

3
.gitignore vendored
View file

@ -17,7 +17,8 @@ src/common/scm_rev.cpp
*.swp
*.kdev4
.markdown-preview.html
.idea/
.idea/*
!.idea/inspectionProfiles
.vs/
.vscode/
.cache/

16
src/android/.editorconfig Normal file
View file

@ -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

View file

@ -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.

View file

@ -0,0 +1,14 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GrazieInspection" enabled="false" level="GRAMMAR_ERROR" enabled_by_default="false" />
<inspection_tool class="GrazieStyle" enabled="false" level="STYLE_SUGGESTION" enabled_by_default="false" />
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="LiftReturnOrAssignment" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View file

@ -0,0 +1 @@
cd ./src/android/ && ktlint --color '!./app/build/generated/**'