detekt: fix syntax of detekt.yml

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-08-12 14:56:14 +02:00
parent d86622588a
commit c56a44592c
No known key found for this signature in database
GPG Key ID: 2585783189A62105

View File

@ -1,5 +1,5 @@
build: build:
maxIssues: 77 maxIssues: 77
weights: weights:
# complexity: 2 # complexity: 2
# LongParameterList: 1 # LongParameterList: 1
@ -8,7 +8,7 @@ build:
processors: processors:
active: true active: true
exclude: exclude: []
# - 'FunctionCountProcessor' # - 'FunctionCountProcessor'
# - 'PropertyCountProcessor' # - 'PropertyCountProcessor'
# - 'ClassCountProcessor' # - 'ClassCountProcessor'
@ -17,7 +17,7 @@ processors:
console-reports: console-reports:
active: true active: true
exclude: exclude: []
# - 'ProjectStatisticsReport' # - 'ProjectStatisticsReport'
# - 'ComplexityReport' # - 'ComplexityReport'
# - 'NotificationReport' # - 'NotificationReport'
@ -59,7 +59,7 @@ complexity:
excludes: ['**/androidTest/**'] excludes: ['**/androidTest/**']
LabeledExpression: LabeledExpression:
active: false active: false
ignoredLabels: "" ignoredLabels: []
LargeClass: LargeClass:
active: true active: true
threshold: 600 threshold: 600
@ -132,7 +132,11 @@ exceptions:
active: true active: true
ExceptionRaisedInUnexpectedLocation: ExceptionRaisedInUnexpectedLocation:
active: false active: false
methodNames: 'toString,hashCode,equals,finalize' methodNames:
- toString
- hashCode
- equals
- finalize
InstanceOfCheckForException: InstanceOfCheckForException:
active: false active: false
NotImplementedDeclaration: NotImplementedDeclaration:
@ -145,14 +149,21 @@ exceptions:
active: false active: false
SwallowedException: SwallowedException:
active: false active: false
ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException' ignoredExceptionTypes:
- InterruptedException
- NumberFormatException
- ParseException
- MalformedURLException
ThrowingExceptionFromFinally: ThrowingExceptionFromFinally:
active: false active: false
ThrowingExceptionInMain: ThrowingExceptionInMain:
active: false active: false
ThrowingExceptionsWithoutMessageOrCause: ThrowingExceptionsWithoutMessageOrCause:
active: false active: false
exceptions: 'IllegalArgumentException,IllegalStateException,IOException' exceptions:
- IllegalArgumentException
- IllegalStateException
- IOException
ThrowingNewInstanceOfSameException: ThrowingNewInstanceOfSameException:
active: false active: false
TooGenericExceptionCaught: TooGenericExceptionCaught:
@ -256,7 +267,7 @@ naming:
enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*' enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
ForbiddenClassName: ForbiddenClassName:
active: false active: false
forbiddenName: '' forbiddenName: []
FunctionMaxLength: FunctionMaxLength:
active: false active: false
maximumFunctionNameLength: 30 maximumFunctionNameLength: 30
@ -268,7 +279,8 @@ naming:
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^' excludeClassPattern: '$^'
ignoreOverridden: true ignoreOverridden: true
excludes: "**/*Test.kt" excludes:
- "**/*Test.kt"
FunctionParameterNaming: FunctionParameterNaming:
active: true active: true
parameterPattern: '[a-z][A-Za-z0-9]*' parameterPattern: '[a-z][A-Za-z0-9]*'
@ -367,10 +379,13 @@ style:
includeLineWrapping: false includeLineWrapping: false
ForbiddenComment: ForbiddenComment:
active: true active: true
values: 'TODO:,FIXME:,STOPSHIP:' values:
- "TODO:"
- "FIXME:"
- "STOPSHIP:"
ForbiddenImport: ForbiddenImport:
active: false active: false
imports: '' imports: []
ForbiddenVoid: ForbiddenVoid:
active: false active: false
FunctionOnlyReturningConstant: FunctionOnlyReturningConstant:
@ -382,7 +397,7 @@ style:
maxJumpCount: 1 maxJumpCount: 1
MagicNumber: MagicNumber:
active: true active: true
ignoreNumbers: '-1,0,1,2' ignoreNumbers: [ "-1","0","1","2" ]
ignoreHashCodeFunction: true ignoreHashCodeFunction: true
ignorePropertyDeclaration: false ignorePropertyDeclaration: false
ignoreConstantDeclaration: true ignoreConstantDeclaration: true
@ -390,7 +405,8 @@ style:
ignoreAnnotation: false ignoreAnnotation: false
ignoreNamedArgument: true ignoreNamedArgument: true
ignoreEnums: false ignoreEnums: false
excludes: "**/*Test.kt" excludes:
- "**/*Test.kt"
MandatoryBracesIfStatements: MandatoryBracesIfStatements:
active: false active: false
MaxLineLength: MaxLineLength:
@ -470,4 +486,6 @@ style:
active: false active: false
WildcardImport: WildcardImport:
active: true active: true
excludeImports: 'java.util.*,kotlinx.android.synthetic.*' excludeImports:
- 'java.util.*'
- 'kotlinx.android.synthetic.*'