|
|
@ -1,24 +1,6 @@
|
|
|
|
autoCorrect: true
|
|
|
|
autoCorrect: true
|
|
|
|
failFast: false
|
|
|
|
failFast: false
|
|
|
|
|
|
|
|
|
|
|
|
test-pattern: # Configure exclusions for test sources
|
|
|
|
|
|
|
|
active: true
|
|
|
|
|
|
|
|
patterns: # Test file regexes
|
|
|
|
|
|
|
|
- '.*/test/.*'
|
|
|
|
|
|
|
|
- '.*Test.kt'
|
|
|
|
|
|
|
|
- '.*Spec.kt'
|
|
|
|
|
|
|
|
exclude-rule-sets:
|
|
|
|
|
|
|
|
- 'comments'
|
|
|
|
|
|
|
|
exclude-rules:
|
|
|
|
|
|
|
|
- 'NamingRules'
|
|
|
|
|
|
|
|
- 'WildcardImport'
|
|
|
|
|
|
|
|
- 'MagicNumber'
|
|
|
|
|
|
|
|
- 'MaxLineLength'
|
|
|
|
|
|
|
|
- 'LateinitUsage'
|
|
|
|
|
|
|
|
- 'StringLiteralDuplication'
|
|
|
|
|
|
|
|
- 'SpreadOperator'
|
|
|
|
|
|
|
|
- 'TooManyFunctions'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
build:
|
|
|
|
maxIssues: 0
|
|
|
|
maxIssues: 0
|
|
|
|
weights:
|
|
|
|
weights:
|
|
|
@ -54,6 +36,7 @@ output-reports:
|
|
|
|
|
|
|
|
|
|
|
|
comments:
|
|
|
|
comments:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
CommentOverPrivateFunction:
|
|
|
|
CommentOverPrivateFunction:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
CommentOverPrivateProperty:
|
|
|
|
CommentOverPrivateProperty:
|
|
|
@ -87,10 +70,16 @@ complexity:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
LargeClass:
|
|
|
|
LargeClass:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
threshold: 150
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
|
|
|
|
# Had to increase the threshold as RC13 started counting lines of code
|
|
|
|
|
|
|
|
# https://github.com/mozilla-mobile/fenix/issues/4861
|
|
|
|
|
|
|
|
threshold: 200
|
|
|
|
LongMethod:
|
|
|
|
LongMethod:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
threshold: 20
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
|
|
|
|
# Had to increase the threshold as RC13 started counting lines of code
|
|
|
|
|
|
|
|
# https://github.com/mozilla-mobile/fenix/issues/4861
|
|
|
|
|
|
|
|
threshold: 75
|
|
|
|
LongParameterList:
|
|
|
|
LongParameterList:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
threshold: 6
|
|
|
|
threshold: 6
|
|
|
@ -103,12 +92,14 @@ complexity:
|
|
|
|
threshold: 4
|
|
|
|
threshold: 4
|
|
|
|
StringLiteralDuplication:
|
|
|
|
StringLiteralDuplication:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
threshold: 3
|
|
|
|
threshold: 3
|
|
|
|
ignoreAnnotation: true
|
|
|
|
ignoreAnnotation: true
|
|
|
|
excludeStringsWithLessThan5Characters: true
|
|
|
|
excludeStringsWithLessThan5Characters: true
|
|
|
|
ignoreStringsRegex: '$^'
|
|
|
|
ignoreStringsRegex: '$^'
|
|
|
|
TooManyFunctions:
|
|
|
|
TooManyFunctions:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
thresholdInFiles: 11
|
|
|
|
thresholdInFiles: 11
|
|
|
|
thresholdInClasses: 11
|
|
|
|
thresholdInClasses: 11
|
|
|
|
thresholdInInterfaces: 11
|
|
|
|
thresholdInInterfaces: 11
|
|
|
@ -134,6 +125,7 @@ empty-blocks:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
EmptyFunctionBlock:
|
|
|
|
EmptyFunctionBlock:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
EmptyIfBlock:
|
|
|
|
EmptyIfBlock:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
EmptyInitBlock:
|
|
|
|
EmptyInitBlock:
|
|
|
@ -211,6 +203,7 @@ naming:
|
|
|
|
minimumFunctionNameLength: 3
|
|
|
|
minimumFunctionNameLength: 3
|
|
|
|
FunctionNaming:
|
|
|
|
FunctionNaming:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
|
|
|
|
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
|
|
|
|
excludeClassPattern: '$^'
|
|
|
|
excludeClassPattern: '$^'
|
|
|
|
MatchingDeclarationName:
|
|
|
|
MatchingDeclarationName:
|
|
|
@ -247,6 +240,7 @@ performance:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
SpreadOperator:
|
|
|
|
SpreadOperator:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
UnnecessaryTemporaryInstantiation:
|
|
|
|
UnnecessaryTemporaryInstantiation:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
|
|
|
@ -268,6 +262,7 @@ potential-bugs:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
LateinitUsage:
|
|
|
|
LateinitUsage:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
excludeAnnotatedProperties: ""
|
|
|
|
excludeAnnotatedProperties: ""
|
|
|
|
ignoreOnClassesPattern: ""
|
|
|
|
ignoreOnClassesPattern: ""
|
|
|
|
UnconditionalJumpStatementInLoop:
|
|
|
|
UnconditionalJumpStatementInLoop:
|
|
|
@ -309,6 +304,7 @@ style:
|
|
|
|
maxJumpCount: 1
|
|
|
|
maxJumpCount: 1
|
|
|
|
MagicNumber:
|
|
|
|
MagicNumber:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
ignoreNumbers: '-1,0,1,2'
|
|
|
|
ignoreNumbers: '-1,0,1,2'
|
|
|
|
ignoreHashCodeFunction: false
|
|
|
|
ignoreHashCodeFunction: false
|
|
|
|
ignorePropertyDeclaration: false
|
|
|
|
ignorePropertyDeclaration: false
|
|
|
@ -319,6 +315,7 @@ style:
|
|
|
|
ignoreEnums: false
|
|
|
|
ignoreEnums: false
|
|
|
|
MaxLineLength:
|
|
|
|
MaxLineLength:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
maxLineLength: 120
|
|
|
|
maxLineLength: 120
|
|
|
|
excludePackageStatements: false
|
|
|
|
excludePackageStatements: false
|
|
|
|
excludeImportStatements: false
|
|
|
|
excludeImportStatements: false
|
|
|
@ -376,4 +373,5 @@ style:
|
|
|
|
active: false
|
|
|
|
active: false
|
|
|
|
WildcardImport:
|
|
|
|
WildcardImport:
|
|
|
|
active: true
|
|
|
|
active: true
|
|
|
|
|
|
|
|
excludes: "**/*Test.kt, **/*Spec.kt, **/test/**, **/androidTest/**"
|
|
|
|
excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
|
|
|
|
excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
|
|
|
|