[#119] Detekt 1.22.0

* Bump version

* Update config
This commit is contained in:
Honza Rychnovsky 2022-12-19 18:57:46 +01:00 committed by GitHub
parent 1e2b4060dd
commit 5ddf6847c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 62 deletions

View File

@ -6,8 +6,8 @@ com.github.ben-manes:gradle-versions-plugin:0.42.0=classpath
com.thoughtworks.xstream:xstream:1.4.17=classpath com.thoughtworks.xstream:xstream:1.4.17=classpath
io.github.detekt.sarif4k:sarif4k:0.0.1=classpath io.github.detekt.sarif4k:sarif4k:0.0.1=classpath
io.github.x-stream:mxparser:1.2.1=classpath io.github.x-stream:mxparser:1.2.1=classpath
io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0=classpath io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0=classpath
io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.21.0=classpath io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.22.0=classpath
net.java.dev.jna:jna:5.6.0=classpath net.java.dev.jna:jna:5.6.0=classpath
org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath
org.jetbrains.kotlin:kotlin-android-extensions:1.7.21=classpath org.jetbrains.kotlin:kotlin-android-extensions:1.7.21=classpath

View File

@ -21,29 +21,29 @@ info.picocli:picocli:4.6.3=ktlint
io.github.davidburstrom.contester:contester-breakpoint:0.2.0=detekt io.github.davidburstrom.contester:contester-breakpoint:0.2.0=detekt
io.github.detekt.sarif4k:sarif4k:0.0.1=detekt,ktlint io.github.detekt.sarif4k:sarif4k:0.0.1=detekt,ktlint
io.github.microutils:kotlin-logging-jvm:2.1.23=ktlint io.github.microutils:kotlin-logging-jvm:2.1.23=ktlint
io.gitlab.arturbosch.detekt:detekt-api:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-api:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-cli:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-cli:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-core:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-core:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-metrics:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-metrics:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-parser:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-parser:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-psi-utils:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-psi-utils:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-report-html:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-report-html:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-report-md:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-report-md:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-report-sarif:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-report-sarif:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-report-txt:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-report-txt:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-report-xml:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-report-xml:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-complexity:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-complexity:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-coroutines:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-coroutines:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-documentation:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-documentation:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-empty:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-empty:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-errorprone:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-errorprone:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-exceptions:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-exceptions:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-naming:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-naming:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-performance:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-performance:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules-style:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules-style:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-rules:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-rules:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-tooling:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-tooling:1.22.0=detekt
io.gitlab.arturbosch.detekt:detekt-utils:1.21.0=detekt io.gitlab.arturbosch.detekt:detekt-utils:1.22.0=detekt
net.java.dev.jna:jna:5.6.0=detekt,ktlint net.java.dev.jna:jna:5.6.0=detekt,ktlint
org.ec4j.core:ec4j-core:0.3.0=ktlint org.ec4j.core:ec4j-core:0.3.0=ktlint
org.freemarker:freemarker:2.3.30=IntellijKoverConfig org.freemarker:freemarker:2.3.30=IntellijKoverConfig
@ -55,21 +55,21 @@ org.jetbrains.intellij.deps:coverage-report:1.0.15=IntellijKoverConfig
org.jetbrains.intellij.deps:intellij-coverage-agent:1.0.668=IntellijKoverConfig org.jetbrains.intellij.deps:intellij-coverage-agent:1.0.668=IntellijKoverConfig
org.jetbrains.intellij.deps:intellij-coverage-reporter:1.0.668=IntellijKoverConfig org.jetbrains.intellij.deps:intellij-coverage-reporter:1.0.668=IntellijKoverConfig
org.jetbrains.intellij.deps:trove4j:1.0.20200330=detekt,ktlint org.jetbrains.intellij.deps:trove4j:1.0.20200330=detekt,ktlint
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.21=detekt
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=ktlint org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.21=detekt org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.21=detekt
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=ktlint org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-reflect:1.6.21=detekt org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.21=detekt
org.jetbrains.kotlin:kotlin-reflect:1.7.10=ktlint org.jetbrains.kotlin:kotlin-reflect:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-script-runtime:1.6.21=detekt org.jetbrains.kotlin:kotlin-reflect:1.7.21=detekt
org.jetbrains.kotlin:kotlin-script-runtime:1.7.10=ktlint org.jetbrains.kotlin:kotlin-script-runtime:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=detekt org.jetbrains.kotlin:kotlin-script-runtime:1.7.21=detekt
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=ktlint org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=detekt
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=ktlint org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=ktlint org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=ktlint
org.jetbrains.kotlin:kotlin-stdlib:1.6.21=detekt
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=ktlint org.jetbrains.kotlin:kotlin-stdlib:1.7.10=ktlint
org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.5=detekt org.jetbrains.kotlin:kotlin-stdlib:1.7.21=detekt
org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.0=detekt
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0=detekt,ktlint org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0=detekt,ktlint
org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0=detekt,ktlint org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0=detekt,ktlint
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.1.0=detekt,ktlint org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.1.0=detekt,ktlint
@ -82,5 +82,5 @@ org.ow2.asm:asm-commons:9.2=JacocoKoverConfig
org.ow2.asm:asm-tree:9.2=JacocoKoverConfig org.ow2.asm:asm-tree:9.2=JacocoKoverConfig
org.ow2.asm:asm:9.2=JacocoKoverConfig org.ow2.asm:asm:9.2=JacocoKoverConfig
org.slf4j:slf4j-api:2.0.0=ktlint org.slf4j:slf4j-api:2.0.0=ktlint
org.yaml:snakeyaml:1.30=detekt org.yaml:snakeyaml:1.33=detekt
empty=annotationProcessor,compileClasspath,detektPlugins,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor,compileClasspath,detektPlugins,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath

View File

@ -11,7 +11,7 @@ kotest-assertion = { module = "io.kotest:kotest-assertions-core", version.ref =
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" } kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
[plugins] [plugins]
detekt = "io.gitlab.arturbosch.detekt:1.21.0" detekt = "io.gitlab.arturbosch.detekt:1.22.0"
dokka = "org.jetbrains.dokka:1.7.10" dokka = "org.jetbrains.dokka:1.7.10"
kover = "org.jetbrains.kotlinx.kover:0.5.1" kover = "org.jetbrains.kotlinx.kover:0.5.1"
versions = "com.github.ben-manes.versions:0.42.0" versions = "com.github.ben-manes.versions:0.42.0"

View File

@ -10,6 +10,7 @@ build:
config: config:
validation: true validation: true
warningsAsErrors: false warningsAsErrors: false
checkExhaustiveness: false
# when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
excludes: '' excludes: ''
@ -78,15 +79,21 @@ comments:
searchInInnerClass: true searchInInnerClass: true
searchInInnerObject: true searchInInnerObject: true
searchInInnerInterface: true searchInInnerInterface: true
searchInProtectedClass: false
UndocumentedPublicFunction: UndocumentedPublicFunction:
active: false active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
searchProtectedFunction: false
UndocumentedPublicProperty: UndocumentedPublicProperty:
active: false active: false
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
searchProtectedProperty: false
complexity: complexity:
active: true active: true
CognitiveComplexMethod:
active: false
threshold: 15
ComplexCondition: ComplexCondition:
active: true active: true
threshold: 4 threshold: 4
@ -95,7 +102,8 @@ complexity:
threshold: 10 threshold: 10
includeStaticDeclarations: false includeStaticDeclarations: false
includePrivateDeclarations: false includePrivateDeclarations: false
ComplexMethod: ignoreOverloaded: false
CyclomaticComplexMethod:
active: true active: true
threshold: 15 threshold: 15
ignoreSingleWhenExpression: false ignoreSingleWhenExpression: false
@ -386,6 +394,8 @@ performance:
SpreadOperator: SpreadOperator:
active: true active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
UnnecessaryPartOfBinaryExpression:
active: false
UnnecessaryTemporaryInstantiation: UnnecessaryTemporaryInstantiation:
active: true active: true
@ -412,8 +422,6 @@ potential-bugs:
- 'java.util.HashSet' - 'java.util.HashSet'
- 'java.util.LinkedHashMap' - 'java.util.LinkedHashMap'
- 'java.util.HashMap' - 'java.util.HashMap'
DuplicateCaseInWhenExpression:
active: true
ElseCaseInsteadOfExhaustiveWhen: ElseCaseInsteadOfExhaustiveWhen:
active: false active: false
EqualsAlwaysReturnsTrueOrFalse: EqualsAlwaysReturnsTrueOrFalse:
@ -428,12 +436,16 @@ potential-bugs:
active: true active: true
IgnoredReturnValue: IgnoredReturnValue:
active: true active: true
restrictToAnnotatedMethods: true restrictToConfig: true
returnValueAnnotations: returnValueAnnotations:
- '*.CheckResult' - '*.CheckResult'
- '*.CheckReturnValue' - '*.CheckReturnValue'
ignoreReturnValueAnnotations: ignoreReturnValueAnnotations:
- '*.CanIgnoreReturnValue' - '*.CanIgnoreReturnValue'
returnValueTypes:
- 'kotlin.sequences.Sequence'
- 'kotlinx.coroutines.flow.*Flow'
- 'java.util.stream.*Stream'
ignoreFunctionCall: [] ignoreFunctionCall: []
ImplicitDefaultLocale: ImplicitDefaultLocale:
active: true active: true
@ -455,17 +467,14 @@ potential-bugs:
MissingPackageDeclaration: MissingPackageDeclaration:
active: false active: false
excludes: ['**/*.kts'] excludes: ['**/*.kts']
MissingWhenCase:
active: true
allowElseExpression: true
NullCheckOnMutableProperty: NullCheckOnMutableProperty:
active: false active: false
NullableToStringCall: NullableToStringCall:
active: false active: false
RedundantElseInWhen:
active: true
UnconditionalJumpStatementInLoop: UnconditionalJumpStatementInLoop:
active: false active: false
UnnecessaryNotNullCheck:
active: false
UnnecessaryNotNullOperator: UnnecessaryNotNullOperator:
active: true active: true
UnnecessarySafeCall: UnnecessarySafeCall:
@ -488,6 +497,8 @@ potential-bugs:
style: style:
active: true active: true
AlsoCouldBeApply:
active: false
CanBeNonNullable: CanBeNonNullable:
active: false active: false
CascadingCallWrapping: CascadingCallWrapping:
@ -499,7 +510,8 @@ style:
active: false active: false
DataClassContainsFunctions: DataClassContainsFunctions:
active: false active: false
conversionFunctionPrefix: 'to' conversionFunctionPrefix:
- 'to'
DataClassShouldBeImmutable: DataClassShouldBeImmutable:
active: false active: false
DestructuringDeclarationWithTooManyEntries: DestructuringDeclarationWithTooManyEntries:
@ -531,14 +543,10 @@ style:
ForbiddenMethodCall: ForbiddenMethodCall:
active: false active: false
methods: methods:
- 'kotlin.io.print' - reason: 'print does not allow you to configure the output stream. Use a logger instead.'
- 'kotlin.io.println' value: 'kotlin.io.print'
ForbiddenPublicDataClass: - reason: 'println does not allow you to configure the output stream. Use a logger instead.'
active: true value: 'kotlin.io.println'
excludes: ['**']
ignorePackages:
- '*.internal'
- '*.internal.*'
ForbiddenSuppress: ForbiddenSuppress:
active: false active: false
rules: [] rules: []
@ -550,13 +558,7 @@ style:
active: true active: true
ignoreOverridableFunction: true ignoreOverridableFunction: true
ignoreActualFunction: true ignoreActualFunction: true
excludedFunctions: '' excludedFunctions: []
LibraryCodeMustSpecifyReturnType:
active: true
excludes: ['**']
LibraryEntitiesShouldNotBePublic:
active: true
excludes: ['**']
LoopWithTooManyJumpStatements: LoopWithTooManyJumpStatements:
active: true active: true
maxJumpCount: 1 maxJumpCount: 1
@ -591,16 +593,20 @@ style:
excludePackageStatements: true excludePackageStatements: true
excludeImportStatements: true excludeImportStatements: true
excludeCommentStatements: false excludeCommentStatements: false
excludeRawStrings: true
MayBeConst: MayBeConst:
active: true active: true
ModifierOrder: ModifierOrder:
active: true active: true
MultilineLambdaItParameter: MultilineLambdaItParameter:
active: false active: false
MultilineRawStringIndentation:
active: false
indentSize: 4
NestedClassesVisibility: NestedClassesVisibility:
active: true active: true
NewLineAtEndOfFile: NewLineAtEndOfFile:
active: false active: true
NoTabs: NoTabs:
active: false active: false
NullableBooleanCheck: NullableBooleanCheck:
@ -626,7 +632,8 @@ style:
ReturnCount: ReturnCount:
active: true active: true
max: 2 max: 2
excludedFunctions: 'equals' excludedFunctions:
- 'equals'
excludeLabeled: false excludeLabeled: false
excludeReturnFromLambda: true excludeReturnFromLambda: true
excludeGuardClauses: false excludeGuardClauses: false
@ -642,6 +649,8 @@ style:
excludeGuardClauses: false excludeGuardClauses: false
TrailingWhitespace: TrailingWhitespace:
active: false active: false
TrimMultilineRawString:
active: false
UnderscoresInNumericLiterals: UnderscoresInNumericLiterals:
active: false active: false
acceptableLength: 4 acceptableLength: 4
@ -664,6 +673,7 @@ style:
active: false active: false
UnnecessaryParentheses: UnnecessaryParentheses:
active: false active: false
allowForUnclearPrecedence: false
UntilInsteadOfRangeTo: UntilInsteadOfRangeTo:
active: false active: false
UnusedImports: UnusedImports:
@ -698,6 +708,8 @@ style:
active: true active: true
UseRequireNotNull: UseRequireNotNull:
active: true active: true
UseSumOfInsteadOfFlatMapSize:
active: false
UselessCallOnNotNull: UselessCallOnNotNull:
active: true active: true
UtilityClassWithPublicConstructor: UtilityClassWithPublicConstructor:
@ -707,6 +719,5 @@ style:
ignoreLateinitVar: false ignoreLateinitVar: false
WildcardImport: WildcardImport:
active: true active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludeImports: excludeImports:
- 'java.util.*' - 'java.util.*'