pachli-android/.editorconfig
Nik Clayton c81bb0238e
refactor: Reformat SQL queries for ease of reading (#1237)
The database queries in the @Query annotations were in a range of
different styles which made them difficult to read, and difficult to
write new ones in a consistent style.

Fix this.

Write a new tool, `sqlfmt`. This processes the DAO files looking for
`@Query(...)` annotations. It extracts the SQL from those annotations
and calls `sqlfluff` (https://github.com/sqlfluff/sqlfluff, which must
be installed separately) to lint and fix formatting issues in the SQL.

The file is re-written with the newly formatted SQL queries.
2025-01-26 19:11:19 +01:00

45 lines
1.2 KiB
INI

root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{java,kt}]
ktlint_code_style = android_studio
ij_kotlin_imports_layout = *
# Disable wildcard imports
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_java_class_count_to_use_import_on_demand = 999
# Require trailing comma
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
# https://pinterest.github.io/ktlint/latest/rules/standard/#class-signature
# Was re-writing class signatures causing spurious diffs.
ktlint_standard_class-signature = disabled
# https://pinterest.github.io/ktlint/latest/rules/standard/#condition-wrapping
# Was re-writing conditions causing spurious diffs.
ktlint-standard_condition-wrapping = disabled
# https://pinterest.github.io/ktlint/latest/rules/standard/#function-expression-body
# Was re-writing functions to expression bodies, causing spurious diffs.
ktlint_standard_function-expression-body = disabled
max_line_length = off
[*.{yml,yaml}]
indent_size = 2
# Disable ktlint on generated source code, see
# https://github.com/JLLeitschuh/ktlint-gradle/issues/746
[**/build/generated/**]
ktlint = disabled