Skip to content

Commit 6257a18

Browse files
dpcondeclaude
andcommitted
Fix Detekt Kotlin version compatibility issue
- Downgrade Kotlin from 1.9.25 to 1.9.23 to match Detekt 1.23.6 - Update Detekt configuration to remove deprecated properties: * Replace ComplexMethod with CyclomaticComplexMethod * Remove deprecated rules (DataClassContainsFunction, MissingWhenCase, etc.) * Fix ForbiddenComment configuration (values -> comments) * Replace deprecated brace rules with current equivalents * Fix excludedFunctions format from string to array * Remove formatting section (deprecated configuration) This resolves the GitHub Actions build failure where detekt was compiled with a different Kotlin version than the project. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8dc584f commit 6257a18

2 files changed

Lines changed: 8 additions & 26 deletions

File tree

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22

33
plugins {
4-
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
5-
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.25'
4+
id 'org.jetbrains.kotlin.jvm' version '1.9.23'
5+
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.23'
66
id 'org.springframework.boot' version '3.5.6'
77
id 'io.spring.dependency-management' version '1.1.7'
88
id 'org.jlleitschuh.gradle.ktlint' version '12.1.0'
9-
id 'io.gitlab.arturbosch.detekt' version '1.23.1'
9+
id 'io.gitlab.arturbosch.detekt' version '1.23.6'
1010
id 'jacoco'
1111
id 'org.owasp.dependencycheck' version '9.0.7'
1212
}

config/detekt/detekt.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ complexity:
4343
threshold: 4
4444
ComplexInterface:
4545
active: false
46-
ComplexMethod:
46+
CyclomaticComplexMethod:
4747
active: true
4848
threshold: 15
4949
LabeledExpression:
@@ -154,10 +154,6 @@ exceptions:
154154
- Throwable
155155
- RuntimeException
156156

157-
formatting:
158-
active: true
159-
android: false
160-
autoCorrect: true
161157

162158
naming:
163159
active: true
@@ -223,8 +219,6 @@ potential-bugs:
223219
active: true
224220
Deprecation:
225221
active: false
226-
DuplicateCaseInWhenExpression:
227-
active: true
228222
EqualsAlwaysReturnsTrueOrFalse:
229223
active: false
230224
EqualsWithHashCodeExist:
@@ -247,10 +241,6 @@ potential-bugs:
247241
active: false
248242
MapGetWithNotNullAssertionOperator:
249243
active: false
250-
MissingWhenCase:
251-
active: false
252-
RedundantElseInWhen:
253-
active: false
254244
UnconditionalJumpStatementInLoop:
255245
active: false
256246
UnnecessaryNotNullOperator:
@@ -272,8 +262,6 @@ style:
272262
active: true
273263
CollapsibleIfStatements:
274264
active: false
275-
DataClassContainsFunction:
276-
active: false
277265
DataClassShouldBeImmutable:
278266
active: false
279267
EqualsNullCall:
@@ -288,21 +276,15 @@ style:
288276
active: false
289277
ForbiddenComment:
290278
active: true
291-
values: ['TODO:', 'FIXME:', 'STOPSHIP:']
279+
comments: ['TODO:', 'FIXME:', 'STOPSHIP:']
292280
ForbiddenImport:
293281
active: false
294282
ForbiddenMethodCall:
295283
active: false
296-
ForbiddenPublicDataClass:
297-
active: false
298284
ForbiddenVoid:
299285
active: false
300286
FunctionOnlyReturningConstant:
301287
active: false
302-
LibraryCodeMustSpecifyReturnType:
303-
active: false
304-
LibraryEntitiesShouldNotBePublic:
305-
active: false
306288
LoopWithTooManyJumpStatements:
307289
active: false
308290
MagicNumber:
@@ -317,7 +299,7 @@ style:
317299
ignoreNamedArgument: true
318300
ignoreEnums: false
319301
ignoreRanges: false
320-
MandatoryBracesIfStatements:
302+
BracesOnIfStatements:
321303
active: false
322304
MaxLineLength:
323305
active: true
@@ -336,7 +318,7 @@ style:
336318
active: true
337319
OptionalUnit:
338320
active: false
339-
OptionalWhenBraces:
321+
BracesOnWhenStatements:
340322
active: false
341323
PreferToOverPairSyntax:
342324
active: false
@@ -349,7 +331,7 @@ style:
349331
ReturnCount:
350332
active: true
351333
max: 2
352-
excludedFunctions: "equals"
334+
excludedFunctions: ["equals"]
353335
excludeLabeled: false
354336
excludeReturnFromLambda: true
355337
excludeGuardClauses: false

0 commit comments

Comments
 (0)