Update detekt.yml

This commit is contained in:
Mygod
2018-03-08 01:11:44 -08:00
parent d2e9ff226c
commit 7b12c1234f

View File

@@ -1,4 +1,4 @@
# https://github.com/arturbosch/detekt/blob/801994bd60cc759b181649356cea045b8125301b/detekt-cli/src/main/resources/default-detekt-config.yml # https://github.com/arturbosch/detekt/blob/f59aa94c2571878e654d085db20d0a851c6f0239/detekt-cli/src/main/resources/default-detekt-config.yml
comments: comments:
active: false active: false
@@ -7,7 +7,7 @@ complexity:
active: true active: true
ComplexCondition: ComplexCondition:
active: true active: true
threshold: 3 threshold: 4
ComplexInterface: ComplexInterface:
active: true active: true
threshold: 10 threshold: 10
@@ -15,6 +15,7 @@ complexity:
ComplexMethod: ComplexMethod:
active: true active: true
threshold: 10 threshold: 10
ignoreSingleWhenExpression: false
LabeledExpression: LabeledExpression:
active: true active: true
LargeClass: LargeClass:
@@ -25,31 +26,32 @@ complexity:
threshold: 20 threshold: 20
LongParameterList: LongParameterList:
active: true active: true
threshold: 5 threshold: 6
ignoreDefaultParameters: true ignoreDefaultParameters: true
MethodOverloading: MethodOverloading:
active: false active: false
NestedBlockDepth: NestedBlockDepth:
active: true active: true
threshold: 3 threshold: 4
StringLiteralDuplication: StringLiteralDuplication:
active: true active: true
threshold: 2 threshold: 3
ignoreAnnotation: true ignoreAnnotation: true
excludeStringsWithLessThan5Characters: true excludeStringsWithLessThan5Characters: true
ignoreStringsRegex: '$^' ignoreStringsRegex: '$^'
TooManyFunctions: TooManyFunctions:
active: true active: true
thresholdInFiles: 10 thresholdInFiles: 11
thresholdInClasses: 10 thresholdInClasses: 11
thresholdInInterfaces: 10 thresholdInInterfaces: 11
thresholdInObjects: 10 thresholdInObjects: 11
thresholdInEnums: 10 thresholdInEnums: 11
empty-blocks: empty-blocks:
active: true active: true
EmptyCatchBlock: EmptyCatchBlock:
active: false active: true
allowedExceptionNameRegex: "^(ignore|expected).*"
EmptyClassBlock: EmptyClassBlock:
active: true active: true
EmptyDefaultConstructor: EmptyDefaultConstructor:
@@ -105,7 +107,7 @@ exceptions:
active: true active: true
TooGenericExceptionCaught: TooGenericExceptionCaught:
active: true active: true
exceptions: exceptionNames:
- ArrayIndexOutOfBoundsException - ArrayIndexOutOfBoundsException
- Error - Error
- Exception - Exception
@@ -116,10 +118,9 @@ exceptions:
- Throwable - Throwable
TooGenericExceptionThrown: TooGenericExceptionThrown:
active: true active: true
exceptions: exceptionNames:
- Error - Error
- Exception - Exception
- NullPointerException
- Throwable - Throwable
- RuntimeException - RuntimeException
@@ -143,6 +144,7 @@ naming:
FunctionNaming: FunctionNaming:
active: true active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^'
MatchingDeclarationName: MatchingDeclarationName:
active: true active: true
MemberNameEqualsClassName: MemberNameEqualsClassName:
@@ -167,6 +169,7 @@ naming:
active: true active: true
variablePattern: '[a-z][A-Za-z0-9]*' variablePattern: '[a-z][A-Za-z0-9]*'
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
performance: performance:
active: true active: true
@@ -239,6 +242,8 @@ style:
maxLineLength: 120 maxLineLength: 120
excludePackageStatements: false excludePackageStatements: false
excludeImportStatements: false excludeImportStatements: false
MayBeConst:
active: true
ModifierOrder: ModifierOrder:
active: true active: true
NestedClassesVisibility: NestedClassesVisibility:
@@ -247,8 +252,6 @@ style:
active: true active: true
OptionalAbstractKeyword: OptionalAbstractKeyword:
active: true active: true
OptionalReturnKeyword:
active: true
OptionalUnit: OptionalUnit:
active: true active: true
OptionalWhenBraces: OptionalWhenBraces:
@@ -278,6 +281,8 @@ style:
active: true active: true
UnusedImports: UnusedImports:
active: true active: true
UnusedPrivateMember:
active: true
UseDataClass: UseDataClass:
active: false active: false
UtilityClassWithPublicConstructor: UtilityClassWithPublicConstructor: