-
Notifications
You must be signed in to change notification settings - Fork 18
/
detekt.yml
71 lines (67 loc) · 2.11 KB
/
detekt.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
config:
warningsAsErrors: true
complexity:
active: true
LongParameterList:
# It is suggested to increase this for Compose: https://detekt.dev/docs/introduction/compose/#longparameterlist
functionThreshold: 8
constructorThreshold: 20
ignoreDefaultParameters: true
ignoreAnnotated:
- "Composable"
LongMethod:
active: true
excludes: [ "*/generated/**" ]
threshold: 100
ignoreAnnotated:
- "Composable"
CyclomaticComplexMethod:
active: true
threshold: 15
ignoreAnnotated:
- "Composable"
TooManyFunctions:
active: true
thresholdInClasses: 20
ignoreAnnotated:
- "InstallIn"
- "TestInstallIn"
naming:
active: true
FunctionNaming:
active: true
functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
excludeClassPattern: '$^'
ignoreAnnotated: [ 'Composable' ]
TopLevelPropertyNaming:
active: true
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
PackageNaming:
active: true
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9_]*)*'
style:
MagicNumber:
ignoreAnnotated: [ 'Preview', 'PreviewScreenSizes', 'PreviewFontScale', 'PreviewLightDark', 'PreviewDynamicColors' ]
excludes: [ '**/test/**', '**/*Test.kt', '**/demos/**', '**/androidUnitTest/**', '**/commonTest/**', '**/desktopTest/**' , '**/jsTest/**' ]
MaxLineLength:
excludes: [ '**/test/**', '**/*.Test.kt', '**/*.Spec.kt', '**/androidUnitTest/**', '**/commonTest/**', '**/desktopTest/**' , '**/jsTest/**' ]
ignoreAnnotated:
- "InstallIn"
- "TestInstallIn"
excludeCommentStatements: true
UnusedPrivateMember:
# https://detekt.dev/docs/introduction/compose#unusedprivatemember
ignoreAnnotated: [ 'Preview', 'PreviewScreenSizes', 'PreviewFontScale', 'PreviewLightDark', 'PreviewDynamicColors' ]
WildcardImport:
active: true
excludeImports: [ ]
ReturnCount:
active: true
max: 3
ignoreAnnotated: [ 'Composable' ]
exceptions:
# TODO: Add this back when exceptions are caught correctly
TooGenericExceptionCaught:
active: false