Skip to content

Commit

Permalink
feat: update detekt version to 1.23.3, adding new fields and removed …
Browse files Browse the repository at this point in the history
…deprecated ones
  • Loading branch information
jesmrec committed Nov 14, 2024
1 parent e48f4cd commit 0836d61
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 36 deletions.
53 changes: 18 additions & 35 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ comments:

complexity:
active: true
CognitiveComplexMethod:
active: false
threshold: 15
ComplexCondition:
active: true
threshold: 5
Expand All @@ -91,7 +94,7 @@ complexity:
threshold: 10
includeStaticDeclarations: false
includePrivateDeclarations: false
ComplexMethod:
CyclomaticComplexMethod:
active: true
threshold: 15
ignoreSingleWhenExpression: false
Expand Down Expand Up @@ -284,7 +287,6 @@ naming:
BooleanPropertyNaming:
active: false
allowedPattern: '^(is|has|are)'
ignoreOverridden: true
ClassNaming:
active: true
classPattern: '[A-Z][a-zA-Z0-9]*'
Expand Down Expand Up @@ -355,7 +357,6 @@ naming:
variablePattern: '[a-z][A-Za-z0-9]*'
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverridden: true

performance:
active: true
Expand Down Expand Up @@ -393,8 +394,6 @@ potential-bugs:
- 'java.util.HashSet'
- 'java.util.LinkedHashMap'
- 'java.util.HashMap'
DuplicateCaseInWhenExpression:
active: true
ElseCaseInsteadOfExhaustiveWhen:
active: false
EqualsAlwaysReturnsTrueOrFalse:
Expand All @@ -409,7 +408,7 @@ potential-bugs:
active: false
IgnoredReturnValue:
active: false
restrictToAnnotatedMethods: true
restrictToConfig: true
returnValueAnnotations:
- '*.CheckResult'
- '*.CheckReturnValue'
Expand All @@ -436,15 +435,10 @@ potential-bugs:
MissingPackageDeclaration:
active: false
excludes: ['**/*.kts']
MissingWhenCase:
active: true
allowElseExpression: true
NullCheckOnMutableProperty:
active: false
NullableToStringCall:
active: false
RedundantElseInWhen:
active: true
UnconditionalJumpStatementInLoop:
active: false
UnnecessaryNotNullOperator:
Expand All @@ -469,6 +463,14 @@ potential-bugs:

style:
active: true
AlsoCouldBeApply:
active: false
BracesOnIfStatements:
singleLine: 'never'
multiLine: 'always'
BracesOnWhenStatements:
singleLine: 'necessary'
multiLine: 'consistent'
CanBeNonNullable:
active: false
ClassOrdering:
Expand All @@ -477,7 +479,8 @@ style:
active: false
DataClassContainsFunctions:
active: false
conversionFunctionPrefix: 'to'
allowOperators: false
conversionFunctionPrefix: ['to']
DataClassShouldBeImmutable:
active: false
DestructuringDeclarationWithTooManyEntries:
Expand All @@ -496,12 +499,8 @@ style:
includeLineWrapping: false
ForbiddenComment:
active: true
values:
- 'FIXME:'
- 'STOPSHIP:'
- 'TODO:'
allowedPatterns: ''
customMessage: ''
comments: ['FIXME:', 'STOPSHIP:', 'TODO:']
ForbiddenImport:
active: false
imports: []
Expand All @@ -511,12 +510,6 @@ style:
methods:
- 'kotlin.io.print'
- 'kotlin.io.println'
ForbiddenPublicDataClass:
active: true
excludes: ['**']
ignorePackages:
- '*.internal'
- '*.internal.*'
ForbiddenVoid:
active: false
ignoreOverridden: false
Expand All @@ -525,13 +518,7 @@ style:
active: true
ignoreOverridableFunction: true
ignoreActualFunction: true
excludedFunctions: ''
LibraryCodeMustSpecifyReturnType:
active: true
excludes: ['**']
LibraryEntitiesShouldNotBePublic:
active: true
excludes: ['**']
excludedFunctions: []
LoopWithTooManyJumpStatements:
active: true
maxJumpCount: 1
Expand All @@ -553,8 +540,6 @@ style:
ignoreEnums: false
ignoreRanges: false
ignoreExtensionFunctions: true
MandatoryBracesIfStatements:
active: false
MandatoryBracesLoops:
active: false
MaxLineLength:
Expand All @@ -581,8 +566,6 @@ style:
active: true
OptionalUnit:
active: false
OptionalWhenBraces:
active: false
PreferToOverPairSyntax:
active: false
ProtectedMemberInFinalClass:
Expand All @@ -596,7 +579,7 @@ style:
ReturnCount:
active: true
max: 2
excludedFunctions: 'equals'
excludedFunctions: ['equals']
excludeLabeled: false
excludeReturnFromLambda: true
excludeGuardClauses: false
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ androidxTestMonitor = "1.6.1"
androidxTestUiAutomator ="2.2.0"
androidxWork = "2.8.1"
coil = "2.2.2"
detekt="1.20.0"
detekt="1.23.3"
dexopener = "2.0.5"
disklrucache = "2.0.2"
media3 ="1.1.1"
Expand Down

0 comments on commit 0836d61

Please sign in to comment.