Files
Amber/config/detekt/detekt.yml
greenart7c3 77cee97725 Fail the build on compiler warnings and unused code
Kotlin warnings are now errors, and a detektAll task checks the app
(every flavor, unit and instrumented tests) and desktop for unused
imports, parameters, variables and private declarations, with type
resolution. Both run in the pre-commit hook and CI.

Fix what they found: deprecated Quartz event types (ZapRequestEvent,
SealEvent), Compose Desktop's deprecated clipboard, painterResource and
tab indicator APIs, unused parameters, imports and variables, needless
safe calls, and test code that no longer compiled cleanly. Deliberate
cases, such as the OkHttp body null checks the offline flavor needs, are
suppressed where they occur.
2026-10-25 19:38:24 -03:00

26 lines
767 B
YAML

# Only the unused-code rules: formatting is ktlint's job, and deprecated or
# needless code is caught by the Kotlin compiler (warnings fail the build, see
# allWarningsAsErrors in build.gradle.kts). Without buildUponDefaultConfig,
# every rule not listed here is off.
style:
active: true
UnusedImport:
active: true
UnusedParameter:
active: true
aliases: ['UNUSED_PARAMETER', 'unused']
allowedNames: 'ignored|expected'
UnusedPrivateClass:
active: true
aliases: ['unused']
UnusedPrivateFunction:
active: true
aliases: ['unused']
UnusedPrivateProperty:
active: true
aliases: ['unused']
allowedNames: 'ignored|expected|serialVersionUID'
UnusedVariable:
active: true
aliases: ['UNUSED_VARIABLE', 'unused']