Refine styling
This commit is contained in:
109
detekt.yml
109
detekt.yml
@@ -1,4 +1,5 @@
|
||||
# https://github.com/arturbosch/detekt/blob/RC6-4/detekt-cli/src/main/resources/default-detekt-config.yml
|
||||
# https://github.com/arturbosch/detekt/blob/RC8/detekt-cli/src/main/resources/default-detekt-config.yml
|
||||
autoCorrect: true
|
||||
|
||||
comments:
|
||||
active: false
|
||||
@@ -46,12 +47,14 @@ complexity:
|
||||
thresholdInInterfaces: 11
|
||||
thresholdInObjects: 11
|
||||
thresholdInEnums: 11
|
||||
ignoreDeprecated: true
|
||||
ignorePrivate: false
|
||||
|
||||
empty-blocks:
|
||||
active: true
|
||||
EmptyCatchBlock:
|
||||
active: true
|
||||
allowedExceptionNameRegex: "^(_|ignore|expected).*"
|
||||
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
|
||||
EmptyClassBlock:
|
||||
active: true
|
||||
EmptyDefaultConstructor:
|
||||
@@ -125,6 +128,90 @@ exceptions:
|
||||
- Throwable
|
||||
- RuntimeException
|
||||
|
||||
formatting:
|
||||
active: true
|
||||
android: true
|
||||
autoCorrect: true
|
||||
ChainWrapping:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
CommentSpacing:
|
||||
active: false
|
||||
Filename:
|
||||
active: true
|
||||
FinalNewline:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
ImportOrdering:
|
||||
active: true
|
||||
autoCorrect: false
|
||||
Indentation:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
indentSize: 4
|
||||
continuationIndentSize: 4
|
||||
MaximumLineLength:
|
||||
active: false
|
||||
ModifierOrdering:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoBlankLineBeforeRbrace:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoConsecutiveBlankLines:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoEmptyClassBody:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoItParamInMultilineLambda:
|
||||
active: true
|
||||
NoLineBreakAfterElse:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoLineBreakBeforeAssignment:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoMultipleSpaces:
|
||||
active: false
|
||||
NoSemicolons:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoTrailingSpaces:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoUnitReturn:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoUnusedImports:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
NoWildcardImports:
|
||||
active: false
|
||||
ParameterListWrapping:
|
||||
active: false
|
||||
SpacingAroundColon:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
SpacingAroundComma:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
SpacingAroundCurly:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
SpacingAroundKeyword:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
SpacingAroundOperators:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
SpacingAroundRangeOperator:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
StringTemplate:
|
||||
active: true
|
||||
autoCorrect: true
|
||||
|
||||
naming:
|
||||
active: true
|
||||
ClassNaming:
|
||||
@@ -153,14 +240,15 @@ naming:
|
||||
ObjectPropertyNaming:
|
||||
active: true
|
||||
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||
PackageNaming:
|
||||
active: true
|
||||
packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
|
||||
TopLevelPropertyNaming:
|
||||
active: true
|
||||
constantPattern: '[A-Z][_A-Z0-9]*'
|
||||
propertyPattern: '[a-z][A-Za-z\d]*'
|
||||
privatePropertyPattern: '(_)?[a-z][A-Za-z0-9]*'
|
||||
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||
privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*'
|
||||
VariableMaxLength:
|
||||
active: true
|
||||
maximumVariableNameLength: 64
|
||||
@@ -223,6 +311,7 @@ style:
|
||||
active: true
|
||||
ExpressionBodySyntax:
|
||||
active: true
|
||||
includeLineWrapping: false
|
||||
ForbiddenComment:
|
||||
active: true
|
||||
values: 'TODO:,FIXME:,STOPSHIP:'
|
||||
@@ -238,11 +327,14 @@ style:
|
||||
maxJumpCount: 1
|
||||
MagicNumber:
|
||||
active: false
|
||||
MandatoryBracesIfStatements:
|
||||
active: false
|
||||
MaxLineLength:
|
||||
active: true
|
||||
maxLineLength: 120
|
||||
excludePackageStatements: false
|
||||
excludeImportStatements: false
|
||||
excludePackageStatements: true
|
||||
excludeImportStatements: true
|
||||
excludeCommentStatements: true
|
||||
MayBeConst:
|
||||
active: true
|
||||
ModifierOrder:
|
||||
@@ -259,6 +351,8 @@ style:
|
||||
active: true
|
||||
OptionalWhenBraces:
|
||||
active: true
|
||||
PreferToOverPairSyntax:
|
||||
active: false
|
||||
ProtectedMemberInFinalClass:
|
||||
active: true
|
||||
RedundantVisibilityModifierRule:
|
||||
@@ -288,9 +382,12 @@ style:
|
||||
active: true
|
||||
UnusedPrivateMember:
|
||||
active: true
|
||||
allowedNames: "(_|ignored|expected|serialVersionUID)"
|
||||
UseDataClass:
|
||||
active: false
|
||||
UtilityClassWithPublicConstructor:
|
||||
active: true
|
||||
VarCouldBeVal:
|
||||
active: false
|
||||
WildcardImport:
|
||||
active: false
|
||||
|
||||
Reference in New Issue
Block a user