corda/detekt-config.yml
Dimos Raptis 963de40902
[NOTICK] - Enable check in detekt for unused imports ()
* [NOTICK] - Enable check in detekt for unused imports

* Put back accidental removal of used import

* Some more accidental removals
2020-03-26 15:46:33 +00:00

198 lines
4.7 KiB
YAML

build:
maxIssues: 0
weights:
# complexity: 2
# LongParameterList: 1
# style: 1
# comments: 1
complexity:
active: true
ComplexCondition:
active: true
excludes: "**/buildSrc/**"
threshold: 4
ComplexMethod:
active: true
excludes: "**/buildSrc/**"
threshold: 10
ignoreSingleWhenExpression: true
LargeClass:
active: true
excludes: "**/test/**,**/integration-test/**,**/integration-test-slow/**,**/*Test.kt,**/*Tests.kt,**/buildSrc/**"
threshold: 600
LongMethod:
active: true
excludes: "**/test/**,**/integration-test/**,**/integration-test-slow/**,**/*Test.kt,**/*Tests.kt,**/buildSrc/**"
threshold: 120
LongParameterList:
active: true
excludes: "**/buildSrc/**"
threshold: 6
ignoreDefaultParameters: false
NestedBlockDepth:
active: true
excludes: "**/buildSrc/**"
threshold: 4
TooManyFunctions:
active: true
excludes: "**/test/**,**/integration-test/**,**/integration-test-slow/**,**/*Test.kt,**/*Tests.kt,**/buildSrc/**"
thresholdInFiles: 15
thresholdInClasses: 15
thresholdInInterfaces: 15
thresholdInObjects: 15
thresholdInEnums: 15
empty-blocks:
active: true
excludes: "**/buildSrc/**"
EmptyCatchBlock:
active: true
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
EmptyClassBlock:
active: true
EmptyDefaultConstructor:
active: true
EmptyDoWhileBlock:
active: true
EmptyElseBlock:
active: true
EmptyFinallyBlock:
active: true
EmptyForBlock:
active: true
EmptyIfBlock:
active: true
EmptyInitBlock:
active: true
EmptyKtFile:
active: true
EmptySecondaryConstructor:
active: true
EmptyWhenBlock:
active: true
EmptyWhileBlock:
active: true
exceptions:
active: true
excludes: "**/buildSrc/**"
TooGenericExceptionCaught:
active: true
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- Throwable
- RuntimeException
naming:
active: true
excludes: "**/buildSrc/**"
ClassNaming:
active: true
classPattern: '[A-Z$][a-zA-Z0-9$]*'
EnumNaming:
active: true
enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
FunctionNaming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^'
ignoreOverridden: true
MatchingDeclarationName:
active: true
ObjectPropertyNaming:
active: true
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
PackageNaming:
active: true
packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$'
TopLevelPropertyNaming:
active: true
constantPattern: '[A-Z][_A-Z0-9]*'
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
VariableNaming:
active: true
variablePattern: '[a-z][A-Za-z0-9]*'
privateVariablePattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverridden: true
performance:
active: true
excludes: "**/buildSrc/**"
ForEachOnRange:
active: true
SpreadOperator:
active: true
UnnecessaryTemporaryInstantiation:
active: true
potential-bugs:
active: true
excludes: "**/buildSrc/**"
DuplicateCaseInWhenExpression:
active: true
EqualsWithHashCodeExist:
active: true
ExplicitGarbageCollectionCall:
active: true
UnreachableCode:
active: true
style:
active: true
ForbiddenComment:
active: true
excludes: "**/buildSrc/**"
values: 'TODO:,FIXME:,STOPSHIP:'
MagicNumber:
active: true
excludes: "**/test/**,**/integration-test/**,**/integration-test-slow/**,**/*Test.kt,**/*Tests.kt,**/buildSrc/**"
ignoreNumbers: '-1,0,1,2'
ignoreHashCodeFunction: true
ignorePropertyDeclaration: false
ignoreConstantDeclaration: true
ignoreCompanionObjectPropertyDeclaration: true
ignoreAnnotation: false
ignoreNamedArgument: true
ignoreEnums: true
MaxLineLength:
active: false
excludes: "**/buildSrc/**"
maxLineLength: 140
excludePackageStatements: true
excludeImportStatements: true
ModifierOrder:
active: true
excludes: "**/buildSrc/**"
OptionalAbstractKeyword:
active: true
excludes: "**/buildSrc/**"
SafeCast:
active: true
excludes: "**/buildSrc/**"
ThrowsCount:
active: true
excludes: "**/buildSrc/**"
max: 2
WildcardImport:
active: true
excludes: "**/buildSrc/**"
excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
UnusedImports:
active: true