Minor refactoring and cleaning

This commit is contained in:
2026-02-16 23:25:52 +01:00
parent d8ee67c2df
commit 7bb1725dc0
9 changed files with 196 additions and 206 deletions

View File

@@ -1,12 +1,3 @@
# =============================================================================
# Detekt configuration — strict backend production standard
# =============================================================================
# Built on top of the default config (buildUponDefaultConfig = true in Gradle).
# Only overrides and activations listed here; everything else uses defaults.
# ---------------------------------------------------------------------------
# Complexity rules
# ---------------------------------------------------------------------------
complexity:
# Cyclomatic complexity per function — matches ESLint complexity: 20
CyclomaticComplexMethod:
@@ -47,9 +38,6 @@ complexity:
active: true
threshold: 80
# ---------------------------------------------------------------------------
# Empty blocks — no empty functions or classes
# ---------------------------------------------------------------------------
empty-blocks:
EmptyFunctionBlock:
active: true
@@ -71,9 +59,6 @@ empty-blocks:
EmptyWhenBlock:
active: true
# ---------------------------------------------------------------------------
# Naming conventions — forbid short / misleading identifiers
# ---------------------------------------------------------------------------
naming:
ForbiddenClassName:
active: false
@@ -91,10 +76,10 @@ naming:
TopLevelPropertyNaming:
active: true
# ---------------------------------------------------------------------------
# Style rules — val preference, visibility, imports, member ordering
# ---------------------------------------------------------------------------
style:
ExpressionBodySyntax:
active: false
# Allow guard-clause heavy functions (early returns are idiomatic Kotlin)
ReturnCount:
active: true
@@ -153,8 +138,6 @@ style:
excludePackageStatements: true
excludeImportStatements: true
# Prefer expression body for simple single-expression functions
OptionalAbstractKeyword:
active: true
@@ -168,9 +151,6 @@ style:
singleLine: always
multiLine: always
# ---------------------------------------------------------------------------
# Potential bugs
# ---------------------------------------------------------------------------
potential-bugs:
EqualsAlwaysReturnsTrueOrFalse:
active: true
@@ -181,9 +161,6 @@ potential-bugs:
IteratorNotThrowingNoSuchElementException:
active: true
# ---------------------------------------------------------------------------
# Performance
# ---------------------------------------------------------------------------
performance:
SpreadOperator:
active: false
@@ -191,9 +168,6 @@ performance:
ForEachOnRange:
active: true
# ---------------------------------------------------------------------------
# Exceptions
# ---------------------------------------------------------------------------
exceptions:
TooGenericExceptionCaught:
active: true
@@ -220,7 +194,3 @@ exceptions:
- "MalformedURLException"
- "NumberFormatException"
- "ParseException"
# ---------------------------------------------------------------------------
# Global exclusions — handled in build.gradle.kts (source.setFrom, exclude)
# ---------------------------------------------------------------------------