Permalink
Browse files

Update Detekt config

  • Loading branch information...
rock3r committed Oct 23, 2018
1 parent 8fc6646 commit 89f1fa531746a7c1bcbff8147ae172dc4c4128fc
Showing with 38 additions and 15 deletions.
  1. +1 −1 app/build.gradle
  2. +2 −1 build.gradle
  3. +0 −1 team-props/static-analysis.gradle
  4. +35 −12 team-props/static-analysis/detekt-config.yml
View
@@ -106,7 +106,7 @@ detekt {
toolVersion detektVersion
input = files("$projectDir/src/")
config = files(teamPropsFile('static-analysis/detekt-config.yml'))
config = files("$rootDir/team-props/static-analysis/detekt-config.yml")
filters = '.*/test/.*,.*/resources/.*,.*/tmp/.*,.*/build/.*,.*/debug/.*'
reports {
xml.enabled = true
View
@@ -34,11 +34,12 @@ subprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://dl.bintray.com/arturbosch/code-analysis' }
jcenter()
}
}
apply plugin: 'io.gitlab.arturbosch.detekt'
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
@@ -1,5 +1,4 @@
apply plugin: 'com.novoda.static-analysis'
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jlleitschuh.gradle.ktlint'
staticAnalysis {
@@ -47,13 +47,6 @@ console-reports:
# - 'FindingsReport' If you exclude this, issues won't show on the console otherwise
# - 'BuildFailureReport' This NEEDS to be commented out, the build won't fail if we exclude it
output-reports:
active: true
exclude:
# - 'HtmlOutputReport'
# - 'PlainOutputReport'
# - 'XmlOutputReport'
comments:
active: true
CommentOverPrivateFunction:
@@ -85,6 +78,7 @@ complexity:
active: true
threshold: 10
ignoreSingleWhenExpression: true
ignoreSimpleWhenEntries: true
LabeledExpression:
active: false
LargeClass:
@@ -188,6 +182,7 @@ exceptions:
- IndexOutOfBoundsException
- RuntimeException
- Throwable
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
TooGenericExceptionThrown:
active: true
exceptionNames:
@@ -260,6 +255,9 @@ formatting:
NoWildcardImports:
active: true
autoCorrect: true
PackageName:
active: true
autoCorrect: true
ParameterListWrapping:
active: true
autoCorrect: true
@@ -279,6 +277,9 @@ formatting:
SpacingAroundOperators:
active: true
autoCorrect: true
SpacingAroundParens:
active: true
autoCorrect: true
SpacingAroundRangeOperator:
active: true
autoCorrect: true
@@ -291,6 +292,11 @@ naming:
ClassNaming:
active: true
classPattern: '[A-Z$][a-zA-Z0-9$]*'
ConstructorParameterNaming:
active: true
parameterPattern: '[a-z][A-Za-z0-9]*'
privateParameterPattern: '[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
EnumNaming:
active: true
enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
@@ -307,15 +313,22 @@ naming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^'
ignoreOverridden: true
FunctionParameterNaming:
active: true
parameterPattern: '[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverriddenFunctions: true
MatchingDeclarationName:
active: false
MemberNameEqualsClassName:
active: false
ignoreOverriddenFunction: true
ObjectPropertyNaming:
active: true
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
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-z0-9]*)*$'
@@ -335,6 +348,7 @@ naming:
variablePattern: '[a-z][A-Za-z0-9]*'
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverridden: true
performance:
active: true
@@ -387,6 +401,8 @@ style:
conversionFunctionPrefix: 'to'
EqualsNullCall:
active: false
ExplicitItLambdaParameter:
active: false
ExpressionBodySyntax:
active: false
includeLineWrapping: false
@@ -396,6 +412,8 @@ style:
ForbiddenImport:
active: false
imports: ''
ForbiddenVoid:
active: false
FunctionOnlyReturningConstant:
active: false
ignoreOverridableFunction: true
@@ -406,7 +424,7 @@ style:
MagicNumber:
active: true
ignoreNumbers: '-1,0,1,2'
ignoreHashCodeFunction: false
ignoreHashCodeFunction: true
ignorePropertyDeclaration: false
ignoreConstantDeclaration: true
ignoreCompanionObjectPropertyDeclaration: true
@@ -418,8 +436,8 @@ style:
MaxLineLength:
active: true
maxLineLength: 150
excludePackageStatements: false
excludeImportStatements: false
excludePackageStatements: true
excludeImportStatements: true
excludeCommentStatements: false
MayBeConst:
active: false
@@ -460,8 +478,13 @@ style:
active: true
UnnecessaryAbstractClass:
active: false
excludeAnnotatedClasses: "dagger.Module"
UnnecessaryApply:
active: false
UnnecessaryInheritance:
active: false
UnnecessaryLet:
active: false
UnnecessaryParentheses:
active: false
UntilInsteadOfRangeTo:
@@ -470,7 +493,7 @@ style:
active: false
UnusedPrivateMember:
active: false
allowedNames: "(_|ignored|expected)"
allowedNames: "(_|ignored|expected|serialVersionUID)"
UseDataClass:
active: false
excludeAnnotatedClasses: ""

0 comments on commit 89f1fa5

Please sign in to comment.