5
CommentOverPrivateProperty:
7
UndocumentedPublicClass:
9
excludes: [ '**/*.kt' ]
10
includes: [ '**/detekt-api/src/main/**/api/*.kt' ]
11
UndocumentedPublicFunction:
13
excludes: [ '**/*.kt' ]
14
includes: [ '**/detekt-api/src/main/**/api/*.kt' ]
17
StringLiteralDuplication:
19
excludes: [ '**/test/**', '**/*Test.kt', '**/*Spec.kt' ]
21
ignoreAnnotation: true
22
excludeStringsWithLessThan5Characters: true
23
ignoreStringsRegex: '$^'
27
includeStaticDeclarations: false
28
includePrivateDeclarations: false
31
ignoreSingleWhenExpression: true
34
excludes: [ '**/test/**', '**/*.Test.kt', '**/*.Spec.kt' ]
42
RedundantSuspendModifier:
46
SuspendFunWithFlowReturnType:
50
InstanceOfCheckForException:
52
NotImplementedDeclaration:
54
ObjectExtendsThrowable:
56
RethrowCaughtException:
60
ThrowingExceptionFromFinally:
62
ThrowingExceptionInMain:
64
ThrowingExceptionsWithoutMessageOrCause:
66
ThrowingNewInstanceOfSameException:
70
TooGenericExceptionCaught:
85
NoEmptyFirstLineInMethodBlock:
89
SpacingAroundAngleBrackets:
91
SpacingAroundDoubleColon:
93
SpacingAroundUnaryOperator:
95
SpacingBetweenDeclarationsWithAnnotations:
97
SpacingBetweenDeclarationsWithComments:
101
TopLevelPropertyNaming:
102
constantPattern: '[a-z][_A-Za-z0-9]*|[A-Z][_A-Z0-9]*'
103
InvalidPackageDeclaration:
105
excludes: [ '**/build-logic/**/*.kt', '**/*.kts' ]
108
NonBooleanPropertyPrefixedWithIs:
114
ConstructorParameterNaming:
118
AvoidReferentialEquality:
120
DontDowncastCollectionTypes:
122
DoubleMutabilityForCollection:
130
ImplicitUnitReturnType:
132
MapGetWithNotNullAssertionOperator:
134
UnconditionalJumpStatementInLoop:
136
UnreachableCatchBlock:
140
excludes: [ '**/test/**', '**/*.Test.kt', '**/*.Spec.kt' ]
141
UselessPostfixExpression:
147
CollapsibleIfStatements:
149
DestructuringDeclarationWithTooManyEntries:
151
EqualsOnSignatureLine:
153
ExplicitCollectionElementAccessMethod:
155
ExplicitItLambdaParameter:
164
- '@requiresTypeResolution'
165
excludes: [ '**/detekt-rules-style/**/ForbiddenComment.kt' ]
169
- 'org.assertj.core.api.Assertions'
174
- 'kotlin.io.println'
175
- 'java.net.URL.openStream'
176
- 'java.lang.Class.getResourceAsStream'
177
- 'java.lang.ClassLoader.getResourceAsStream'
180
LibraryCodeMustSpecifyReturnType:
182
excludes: [ '**/*.kt' ]
183
includes: [ '**/detekt-api/src/main/**/api/*.kt' ]
185
excludes: [ '**/test/**', '**/*Test.kt', '**/*Spec.kt' ]
186
ignorePropertyDeclaration: true
187
ignoreAnnotation: true
196
MandatoryBracesLoops:
200
excludes: [ '**/test/**', '**/*Test.kt', '**/*Spec.kt' ]
201
excludeCommentStatements: true
203
NestedClassesVisibility:
205
ObjectLiteralToLambda:
207
PreferToOverPairSyntax:
209
RedundantExplicitType:
211
RedundantHigherOrderMapUsage:
213
RedundantVisibilityModifierRule:
217
excludeGuardClauses: true
218
SpacingBetweenPackageAndImports:
220
UnderscoresInNumericLiterals:
222
UnnecessaryAnnotationUseSiteTarget:
228
UntilInsteadOfRangeTo:
234
allowedNames: '(_|ignored|expected)'
235
UseAnyOrNoneInsteadOfFind:
253
ignoreAnnotated: [ 'Parameter' ]