Skip to content

Commit

Permalink
Merge pull request #371 from nimblehq/chore/369-update-deprecated-det…
Browse files Browse the repository at this point in the history
…ekt-attrs-in-all-template

[#369] Update deprecated Detekt attrs in all templates
  • Loading branch information
toby-thanathip authored Dec 20, 2022
2 parents 89de3d1 + bf665f1 commit 602c3cf
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 96 deletions.
48 changes: 24 additions & 24 deletions sample-compose/detekt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ complexity:
threshold: 20
LongParameterList:
active: true
threshold: 5
functionThreshold: 5
ignoreDefaultParameters: true
MethodOverloading:
active: false
Expand Down Expand Up @@ -127,7 +127,7 @@ exceptions:
active: true
ExceptionRaisedInUnexpectedLocation:
active: false
methodNames: 'toString,hashCode,equals,finalize'
methodNames: [ 'toString', 'hashCode', 'equals', 'finalize' ]
InstanceOfCheckForException:
active: false
NotImplementedDeclaration:
Expand All @@ -146,28 +146,28 @@ exceptions:
active: false
ThrowingExceptionsWithoutMessageOrCause:
active: false
exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
exceptions: [ 'IllegalArgumentException', 'IllegalStateException', 'IOException' ]
ThrowingNewInstanceOfSameException:
active: false
TooGenericExceptionCaught:
active: true
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException

naming:
active: true
Expand All @@ -179,7 +179,7 @@ naming:
enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
ForbiddenClassName:
active: false
forbiddenName: ''
forbiddenName: [ '' ]
FunctionMaxLength:
active: false
maximumFunctionNameLength: 30
Expand All @@ -188,13 +188,13 @@ naming:
minimumFunctionNameLength: 3
FunctionNaming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
functionPattern: '[a-zA-Z][a-zA-Z0-9]*'
ignoreAnnotated: [ 'Composable' ]
MatchingDeclarationName:
active: true
MemberNameEqualsClassName:
active: false
ignoreOverriddenFunction: true
ignoreOverridden: true
ObjectPropertyNaming:
active: true
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
Expand Down Expand Up @@ -244,7 +244,7 @@ potential-bugs:
active: false
LateinitUsage:
active: false
excludeAnnotatedProperties: ""
ignoreAnnotated: [ '' ]
ignoreOnClassesPattern: ""
UnconditionalJumpStatementInLoop:
active: false
Expand Down Expand Up @@ -272,10 +272,10 @@ style:
active: false
ForbiddenComment:
active: true
values: 'FIXME:,STOPSHIP:'
values: [ 'FIXME:', 'STOPSHIP:' ]
ForbiddenImport:
active: false
imports: ''
imports: [ '' ]
FunctionOnlyReturningConstant:
active: false
ignoreOverridableFunction: true
Expand All @@ -285,7 +285,7 @@ style:
maxJumpCount: 1
MagicNumber:
active: true
ignoreNumbers: '-1,0,1,2'
ignoreNumbers: [ '-1', '0', '1', '2' ]
ignoreHashCodeFunction: false
ignorePropertyDeclaration: true
ignoreConstantDeclaration: true
Expand Down Expand Up @@ -342,7 +342,7 @@ style:
ignoreAnnotated: [ 'Preview' ]
UseDataClass:
active: false
excludeAnnotatedClasses: ""
ignoreAnnotated: [ '' ]
UtilityClassWithPublicConstructor:
active: false
WildcardImport:
Expand Down
50 changes: 26 additions & 24 deletions sample-xml/detekt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ complexity:
threshold: 20
LongParameterList:
active: true
threshold: 5
functionThreshold: 5
ignoreDefaultParameters: false
MethodOverloading:
active: false
Expand Down Expand Up @@ -127,7 +127,7 @@ exceptions:
active: true
ExceptionRaisedInUnexpectedLocation:
active: false
methodNames: 'toString,hashCode,equals,finalize'
methodNames: [ 'toString', 'hashCode', 'equals', 'finalize' ]
InstanceOfCheckForException:
active: false
NotImplementedDeclaration:
Expand All @@ -146,28 +146,28 @@ exceptions:
active: false
ThrowingExceptionsWithoutMessageOrCause:
active: false
exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
exceptions: [ 'IllegalArgumentException', 'IllegalStateException', 'IOException' ]
ThrowingNewInstanceOfSameException:
active: false
TooGenericExceptionCaught:
active: true
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException

naming:
active: true
Expand All @@ -179,7 +179,7 @@ naming:
enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
ForbiddenClassName:
active: false
forbiddenName: ''
forbiddenName: [ '' ]
FunctionMaxLength:
active: false
maximumFunctionNameLength: 30
Expand All @@ -188,12 +188,12 @@ naming:
minimumFunctionNameLength: 3
FunctionNaming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
functionPattern: '[a-zA-Z][a-zA-Z0-9]*'
MatchingDeclarationName:
active: true
MemberNameEqualsClassName:
active: false
ignoreOverriddenFunction: true
ignoreOverridden: true
ObjectPropertyNaming:
active: true
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
Expand Down Expand Up @@ -243,7 +243,7 @@ potential-bugs:
active: false
LateinitUsage:
active: false
excludeAnnotatedProperties: ""
ignoreAnnotated: [ '' ]
ignoreOnClassesPattern: ""
UnconditionalJumpStatementInLoop:
active: false
Expand Down Expand Up @@ -271,10 +271,10 @@ style:
active: false
ForbiddenComment:
active: true
values: 'FIXME:,STOPSHIP:'
values: [ 'FIXME:', 'STOPSHIP:' ]
ForbiddenImport:
active: false
imports: ''
imports: [ '' ]
FunctionOnlyReturningConstant:
active: false
ignoreOverridableFunction: true
Expand All @@ -284,7 +284,7 @@ style:
maxJumpCount: 1
MagicNumber:
active: true
ignoreNumbers: '-1,0,1,2'
ignoreNumbers: [ '-1', '0', '1', '2' ]
ignoreHashCodeFunction: false
ignorePropertyDeclaration: false
ignoreConstantDeclaration: true
Expand Down Expand Up @@ -336,9 +336,11 @@ style:
active: false
UnusedImports:
active: false
UnusedPrivateMember:
active: true
UseDataClass:
active: false
excludeAnnotatedClasses: ""
ignoreAnnotated: [ '' ]
UtilityClassWithPublicConstructor:
active: false
WildcardImport:
Expand Down
48 changes: 24 additions & 24 deletions template-compose/detekt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ complexity:
threshold: 20
LongParameterList:
active: true
threshold: 5
functionThreshold: 5
ignoreDefaultParameters: true
MethodOverloading:
active: false
Expand Down Expand Up @@ -127,7 +127,7 @@ exceptions:
active: true
ExceptionRaisedInUnexpectedLocation:
active: false
methodNames: 'toString,hashCode,equals,finalize'
methodNames: [ 'toString', 'hashCode', 'equals' , 'finalize' ]
InstanceOfCheckForException:
active: false
NotImplementedDeclaration:
Expand All @@ -146,28 +146,28 @@ exceptions:
active: false
ThrowingExceptionsWithoutMessageOrCause:
active: false
exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
exceptions: [ 'IllegalArgumentException', 'IllegalStateException', 'IOException' ]
ThrowingNewInstanceOfSameException:
active: false
TooGenericExceptionCaught:
active: true
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException
- Error
- Exception
- NullPointerException
- Throwable
- RuntimeException

naming:
active: true
Expand All @@ -179,7 +179,7 @@ naming:
enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
ForbiddenClassName:
active: false
forbiddenName: ''
forbiddenName: [ '' ]
FunctionMaxLength:
active: false
maximumFunctionNameLength: 30
Expand All @@ -188,13 +188,13 @@ naming:
minimumFunctionNameLength: 3
FunctionNaming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
functionPattern: '[a-zA-Z][a-zA-Z0-9]*'
ignoreAnnotated: [ 'Composable' ]
MatchingDeclarationName:
active: true
MemberNameEqualsClassName:
active: false
ignoreOverriddenFunction: true
ignoreOverridden: true
ObjectPropertyNaming:
active: true
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
Expand Down Expand Up @@ -244,7 +244,7 @@ potential-bugs:
active: false
LateinitUsage:
active: false
excludeAnnotatedProperties: ""
ignoreAnnotated: [ '' ]
ignoreOnClassesPattern: ""
UnconditionalJumpStatementInLoop:
active: false
Expand Down Expand Up @@ -272,10 +272,10 @@ style:
active: false
ForbiddenComment:
active: true
values: 'FIXME:,STOPSHIP:'
values: [ 'FIXME:', 'STOPSHIP:' ]
ForbiddenImport:
active: false
imports: ''
imports: [ '' ]
FunctionOnlyReturningConstant:
active: false
ignoreOverridableFunction: true
Expand All @@ -285,7 +285,7 @@ style:
maxJumpCount: 1
MagicNumber:
active: true
ignoreNumbers: '-1,0,1,2'
ignoreNumbers: [ '-1', '0', '1', '2' ]
ignoreHashCodeFunction: false
ignorePropertyDeclaration: true
ignoreConstantDeclaration: true
Expand Down Expand Up @@ -342,7 +342,7 @@ style:
ignoreAnnotated: [ 'Preview' ]
UseDataClass:
active: false
excludeAnnotatedClasses: ""
ignoreAnnotated: [ '' ]
UtilityClassWithPublicConstructor:
active: false
WildcardImport:
Expand Down
Loading

0 comments on commit 602c3cf

Please sign in to comment.