Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.
# Overrides on top of detekt's default config (buildUponDefaultConfig = true in app/build.gradle.kts).
# Keep this file small: only deviations from defaults belong here.
# No baseline file: the whole repo must pass. Thresholds below are fitted to the
# codebase's idioms (Compose UI, tool-dispatch architecture); tighten over time,
# never loosen without review.
build:
maxIssues: 0
style:
MaxLineLength:
maxLineLength: 140
excludeCommentStatements: true
# Compose UI code is full of literal dp/sp/fraction values; extracting each into a
# named constant hurts readability more than it helps.
MagicNumber:
active: false
# Tool implementations use early `return err(...)` guard returns throughout; counting
# returns fights that idiom.
ReturnCount:
active: false
DestructuringDeclarationWithTooManyEntries:
maxDestructuringEntries: 4
LoopWithTooManyJumpStatements:
maxJumpCount: 3
naming:
# Composable functions are PascalCase by convention.
FunctionNaming:
ignoreAnnotated: ["Composable"]
empty-blocks:
# Android listener interfaces (RecognitionListener, LocationListener, ...) force
# no-op overrides.
EmptyFunctionBlock:
ignoreOverridden: true
complexity:
CyclomaticComplexMethod:
threshold: 25
ignoreAnnotated: ["Composable"]
LongMethod:
threshold: 110
ignoreAnnotated: ["Composable"]
LongParameterList:
functionThreshold: 8
constructorThreshold: 8
ignoreDefaultParameters: true
ignoreAnnotated: ["Composable"]
NestedBlockDepth:
threshold: 6
ComplexCondition:
threshold: 7
TooManyFunctions:
thresholdInFiles: 20
thresholdInClasses: 20
thresholdInObjects: 20
exceptions:
# Tool implementations intentionally catch broad exceptions and convert them to ToolResult errors
TooGenericExceptionCaught:
active: false
gotcha:
NoRawDebugLog:
active: true
# GotchaLog.kt is the one sanctioned place raw Log.d/Log.v appears (behind
# BuildConfig.DEBUG). Everything else must route through the facade.
excludes: ["**/GotchaLog.kt"]
UnskinnedPopup:
active: true
# The theme package is where the Skin* wrappers call the Material originals.
excludes: ["**/ui/theme/**"]
GlassRoleAlphaOverride:
active: true
formatting:
MaximumLineLength:
maxLineLength: 140