Skip to content

Commit d11443b

Browse files
RBusarowkodiakhq[bot]
authored andcommitted
update detekt-config for 1.20
1 parent 22a6945 commit d11443b

File tree

4 files changed

+33
-157
lines changed

4 files changed

+33
-157
lines changed

build-logic/mcbuild/src/main/kotlin/mcbuild.detekt.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ detekt {
2323

2424
parallel = true
2525
config = files("$rootDir/detekt/detekt-config.yml")
26+
buildUponDefaultConfig = true
2627
}
2728

2829
tasks.withType<Detekt> {

detekt/detekt-config.yml

Lines changed: 30 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ console-reports:
3636
- 'ProjectStatisticsReport'
3737
- 'ComplexityReport'
3838
- 'NotificationReport'
39-
# - 'FindingsReport'
39+
- 'FindingsReport'
4040
- 'FileBasedFindingsReport'
41-
- 'LiteFindingsReport'
41+
# - 'LiteFindingsReport'
4242

4343
output-reports:
4444
active: true
@@ -66,6 +66,7 @@ comments:
6666
active: false
6767
matchTypeParameters: true
6868
matchDeclarationsOrder: true
69+
allowParamOnConstructorProperties: false
6970
UndocumentedPublicClass:
7071
active: false
7172
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
@@ -128,6 +129,7 @@ complexity:
128129
NamedArguments:
129130
active: false
130131
threshold: 3
132+
ignoreArgumentsMatchingNames: false
131133
NestedBlockDepth:
132134
active: true
133135
threshold: 4
@@ -163,11 +165,13 @@ coroutines:
163165
- 'Default'
164166
- 'Unconfined'
165167
RedundantSuspendModifier:
166-
active: false
168+
active: true
167169
SleepInsteadOfDelay:
168-
active: false
170+
active: true
171+
SuspendFunWithCoroutineScopeReceiver:
172+
active: true
169173
SuspendFunWithFlowReturnType:
170-
active: false
174+
active: true
171175

172176
empty-blocks:
173177
active: true
@@ -275,173 +279,32 @@ exceptions:
275279
- 'RuntimeException'
276280
- 'Throwable'
277281

278-
formatting:
279-
active: true
280-
android: false
281-
autoCorrect: true
282-
AnnotationOnSeparateLine:
283-
active: false
284-
autoCorrect: true
285-
AnnotationSpacing:
286-
active: false
287-
autoCorrect: true
288-
ArgumentListWrapping:
289-
active: false
290-
autoCorrect: true
291-
indentSize: 4
292-
maxLineLength: 120
293-
ChainWrapping:
294-
active: true
295-
autoCorrect: true
296-
CommentSpacing:
297-
active: true
298-
autoCorrect: true
299-
EnumEntryNameCase:
300-
active: false
301-
autoCorrect: true
302-
Filename:
303-
active: true
304-
FinalNewline:
305-
active: true
306-
autoCorrect: true
307-
insertFinalNewLine: true
308-
ImportOrdering:
309-
active: false
310-
autoCorrect: true
311-
layout: '*,java.**,javax.**,kotlin.**,^'
312-
Indentation:
313-
active: false
314-
autoCorrect: true
315-
indentSize: 4
316-
continuationIndentSize: 4
317-
MaximumLineLength:
318-
active: true
319-
maxLineLength: 120
320-
ignoreBackTickedIdentifier: false
321-
ModifierOrdering:
322-
active: true
323-
autoCorrect: true
324-
MultiLineIfElse:
325-
active: false
326-
autoCorrect: true
327-
NoBlankLineBeforeRbrace:
328-
active: true
329-
autoCorrect: true
330-
NoConsecutiveBlankLines:
331-
active: true
332-
autoCorrect: true
333-
NoEmptyClassBody:
334-
active: true
335-
autoCorrect: true
336-
NoEmptyFirstLineInMethodBlock:
337-
active: false
338-
autoCorrect: true
339-
NoLineBreakAfterElse:
340-
active: true
341-
autoCorrect: true
342-
NoLineBreakBeforeAssignment:
343-
active: true
344-
autoCorrect: true
345-
NoMultipleSpaces:
346-
active: true
347-
autoCorrect: true
348-
NoSemicolons:
349-
active: true
350-
autoCorrect: true
351-
NoTrailingSpaces:
352-
active: true
353-
autoCorrect: true
354-
NoUnitReturn:
355-
active: true
356-
autoCorrect: true
357-
NoUnusedImports:
358-
active: true
359-
autoCorrect: true
360-
NoWildcardImports:
361-
active: true
362-
PackageName:
363-
active: false
364-
autoCorrect: true
365-
ParameterListWrapping:
366-
active: true
367-
autoCorrect: true
368-
indentSize: 4
369-
maxLineLength: 120
370-
SpacingAroundAngleBrackets:
371-
active: false
372-
autoCorrect: true
373-
SpacingAroundColon:
374-
active: true
375-
autoCorrect: true
376-
SpacingAroundComma:
377-
active: true
378-
autoCorrect: true
379-
SpacingAroundCurly:
380-
active: true
381-
autoCorrect: true
382-
SpacingAroundDot:
383-
active: true
384-
autoCorrect: true
385-
SpacingAroundDoubleColon:
386-
active: false
387-
autoCorrect: true
388-
SpacingAroundKeyword:
389-
active: true
390-
autoCorrect: true
391-
SpacingAroundOperators:
392-
active: true
393-
autoCorrect: true
394-
SpacingAroundParens:
395-
active: true
396-
autoCorrect: true
397-
SpacingAroundRangeOperator:
398-
active: true
399-
autoCorrect: true
400-
SpacingAroundUnaryOperator:
401-
active: false
402-
autoCorrect: true
403-
SpacingBetweenDeclarationsWithAnnotations:
404-
active: false
405-
autoCorrect: true
406-
SpacingBetweenDeclarationsWithComments:
407-
active: false
408-
autoCorrect: true
409-
StringTemplate:
410-
active: true
411-
autoCorrect: true
412-
413282
naming:
414283
active: true
415284
BooleanPropertyNaming:
416285
active: false
417-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
418286
allowedPattern: '^(is|has|are)'
287+
ignoreOverridden: true
419288
ClassNaming:
420289
active: false
421-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
422290
classPattern: '[A-Z][a-zA-Z0-9]*'
423291
ConstructorParameterNaming:
424292
active: true
425-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
426293
parameterPattern: '[a-z][A-Za-z0-9]*'
427294
privateParameterPattern: '[a-z][A-Za-z0-9]*'
428295
excludeClassPattern: '$^'
429296
ignoreOverridden: true
430297
EnumNaming:
431298
active: true
432-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
433299
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
434300
ForbiddenClassName:
435301
active: false
436-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
437302
forbiddenName: [ ]
438303
FunctionMaxLength:
439304
active: false
440-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
441305
maximumFunctionNameLength: 30
442306
FunctionMinLength:
443307
active: false
444-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
445308
minimumFunctionNameLength: 3
446309
FunctionNaming:
447310
active: true
@@ -451,16 +314,15 @@ naming:
451314
ignoreOverridden: true
452315
FunctionParameterNaming:
453316
active: true
454-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
455317
parameterPattern: '[a-z][A-Za-z0-9]*'
456318
excludeClassPattern: '$^'
457319
ignoreOverridden: true
458320
InvalidPackageDeclaration:
459321
active: false
460322
rootPackage: ''
323+
requireRootInDeclaration: false
461324
LambdaParameterNaming:
462325
active: false
463-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
464326
parameterPattern: '[a-z][A-Za-z0-9]*|_'
465327
MatchingDeclarationName:
466328
active: true
@@ -472,34 +334,27 @@ naming:
472334
active: false
473335
NonBooleanPropertyPrefixedWithIs:
474336
active: false
475-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
476337
ObjectPropertyNaming:
477338
active: true
478-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
479339
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
480340
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
481341
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
482342
PackageNaming:
483343
active: true
484-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
485344
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
486345
TopLevelPropertyNaming:
487346
active: true
488-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
489347
constantPattern: '[A-Z][_A-Z0-9]*'
490348
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
491349
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
492350
VariableMaxLength:
493351
active: false
494-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
495352
maximumVariableNameLength: 64
496353
VariableMinLength:
497354
active: false
498-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
499355
minimumVariableNameLength: 1
500356
VariableNaming:
501357
active: true
502-
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ]
503358
variablePattern: '[a-z][A-Za-z0-9]*'
504359
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
505360
excludeClassPattern: '$^'
@@ -532,8 +387,19 @@ potential-bugs:
532387
active: false
533388
DoubleMutabilityForCollection:
534389
active: false
390+
mutableTypes:
391+
- 'kotlin.collections.MutableList'
392+
- 'kotlin.collections.MutableMap'
393+
- 'kotlin.collections.MutableSet'
394+
- 'java.util.ArrayList'
395+
- 'java.util.LinkedHashSet'
396+
- 'java.util.HashSet'
397+
- 'java.util.LinkedHashMap'
398+
- 'java.util.HashMap'
535399
DuplicateCaseInWhenExpression:
536400
active: true
401+
ElseCaseInsteadOfExhaustiveWhen:
402+
active: true
537403
EqualsAlwaysReturnsTrueOrFalse:
538404
active: true
539405
EqualsWithHashCodeExist:
@@ -552,6 +418,7 @@ potential-bugs:
552418
- '*.CheckReturnValue'
553419
ignoreReturnValueAnnotations:
554420
- '*.CanIgnoreReturnValue'
421+
ignoreFunctionCall: [ ]
555422
ImplicitDefaultLocale:
556423
active: true
557424
ImplicitUnitReturnType:
@@ -575,6 +442,8 @@ potential-bugs:
575442
MissingWhenCase:
576443
active: true
577444
allowElseExpression: true
445+
NullCheckOnMutableProperty:
446+
active: false
578447
NullableToStringCall:
579448
active: false
580449
RedundantElseInWhen:
@@ -603,6 +472,8 @@ potential-bugs:
603472

604473
style:
605474
active: true
475+
CanBeNonNullable:
476+
active: false
606477
ClassOrdering:
607478
active: false
608479
CollapsibleIfStatements:
@@ -747,6 +618,7 @@ style:
747618
UnderscoresInNumericLiterals:
748619
active: false
749620
acceptableLength: 4
621+
allowNonStandardGrouping: false
750622
UnnecessaryAbstractClass:
751623
active: true
752624
UnnecessaryAnnotationUseSiteTarget:
@@ -757,6 +629,8 @@ style:
757629
active: false
758630
UnnecessaryInheritance:
759631
active: true
632+
UnnecessaryInnerClass:
633+
active: false
760634
UnnecessaryLet:
761635
active: false
762636
UnnecessaryParentheses:

modulecheck-dagger/src/main/kotlin/modulecheck/dagger/AppScope.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package modulecheck.dagger
1818
import javax.inject.Scope
1919
import kotlin.reflect.KClass
2020

21+
@Suppress("UnnecessaryAbstractClass")
2122
abstract class AppScope private constructor()
2223

2324
@Scope

modulecheck-runtime/src/testFixtures/kotlin/modulecheck/runtime/test/outputParsing.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import kotlin.properties.Delegates
3535

3636
private typealias ProjectPath = String
3737

38-
@Suppress("LocalVariableName", "ComplexMethod")
38+
@Suppress("LocalVariableName", "VariableNaming", "ComplexMethod")
3939
internal fun String.parseReportOutput(): List<Pair<ProjectPath, List<ProjectFindingReport>>> {
4040

4141
val DELIM = "\u200B"

0 commit comments

Comments
 (0)