2022-12-11 22:27:04 +00:00
|
|
|
# Please refer to https://github.com/mozilla-mobile/firefox-android/blob/main/android-components/config/detekt.yml
|
|
|
|
# for the source of truth for our detekt configuration.
|
|
|
|
|
2019-01-30 16:36:14 +00:00
|
|
|
build:
|
|
|
|
maxIssues: 0
|
2022-01-08 19:23:08 +00:00
|
|
|
excludeCorrectable: false
|
2019-01-30 16:36:14 +00:00
|
|
|
weights:
|
|
|
|
# complexity: 2
|
|
|
|
# LongParameterList: 1
|
|
|
|
# style: 1
|
|
|
|
# comments: 1
|
|
|
|
|
2023-05-12 04:50:19 +00:00
|
|
|
config:
|
|
|
|
validation: true
|
|
|
|
warningsAsErrors: false
|
|
|
|
checkExhaustiveness: false
|
|
|
|
# when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
|
|
|
|
excludes: ''
|
|
|
|
|
2019-01-30 16:36:14 +00:00
|
|
|
processors:
|
|
|
|
active: true
|
|
|
|
exclude:
|
2023-05-12 04:50:19 +00:00
|
|
|
- 'DetektProgressListener'
|
2022-01-08 19:23:08 +00:00
|
|
|
# - 'KtFileCountProcessor'
|
|
|
|
# - 'PackageCountProcessor'
|
|
|
|
# - 'ClassCountProcessor'
|
2019-01-30 16:36:14 +00:00
|
|
|
# - 'FunctionCountProcessor'
|
|
|
|
# - 'PropertyCountProcessor'
|
2022-01-08 19:23:08 +00:00
|
|
|
# - 'ProjectComplexityProcessor'
|
|
|
|
# - 'ProjectCognitiveComplexityProcessor'
|
|
|
|
# - 'ProjectLLOCProcessor'
|
|
|
|
# - 'ProjectCLOCProcessor'
|
|
|
|
# - 'ProjectLOCProcessor'
|
|
|
|
# - 'ProjectSLOCProcessor'
|
|
|
|
# - 'LicenseHeaderLoaderExtension'
|
2019-01-30 16:36:14 +00:00
|
|
|
|
|
|
|
console-reports:
|
|
|
|
active: true
|
|
|
|
exclude:
|
|
|
|
# - 'ProjectStatisticsReport'
|
|
|
|
# - 'ComplexityReport'
|
|
|
|
# - 'NotificationReport'
|
|
|
|
# - 'FindingsReport'
|
2022-01-08 19:23:08 +00:00
|
|
|
# - 'FileBasedFindingsReport'
|
2023-05-12 04:50:19 +00:00
|
|
|
# - 'LiteFindingsReport'
|
|
|
|
|
|
|
|
output-reports:
|
|
|
|
active: true
|
|
|
|
exclude:
|
|
|
|
# - 'TxtOutputReport'
|
|
|
|
# - 'XmlOutputReport'
|
|
|
|
# - 'HtmlOutputReport'
|
|
|
|
# - 'MdOutputReport'
|
2023-05-25 19:40:54 +00:00
|
|
|
# - 'SarifOutputReport'
|
2019-01-30 16:36:14 +00:00
|
|
|
|
|
|
|
comments:
|
|
|
|
active: true
|
2020-07-20 22:09:58 +00:00
|
|
|
AbsentOrWrongFileLicense:
|
2023-08-12 03:45:01 +00:00
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
licenseTemplateFile: 'license.template'
|
|
|
|
licenseTemplateIsRegex: false
|
2019-01-30 16:36:14 +00:00
|
|
|
CommentOverPrivateFunction:
|
|
|
|
active: false
|
|
|
|
CommentOverPrivateProperty:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
DeprecatedBlockTag:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
EndOfSentenceFormat:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
|
2023-05-12 04:50:19 +00:00
|
|
|
KDocReferencesNonPublicProperty:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2022-01-08 19:23:08 +00:00
|
|
|
OutdatedDocumentation:
|
2023-08-13 01:48:11 +00:00
|
|
|
active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1848527
|
|
|
|
matchTypeParameters: false # (Default: true) Disabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1848527
|
2022-01-08 19:23:08 +00:00
|
|
|
matchDeclarationsOrder: true
|
2023-05-12 04:50:19 +00:00
|
|
|
allowParamOnConstructorProperties: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UndocumentedPublicClass:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
searchInNestedClass: true
|
|
|
|
searchInInnerClass: true
|
|
|
|
searchInInnerObject: true
|
|
|
|
searchInInnerInterface: true
|
2023-05-12 04:50:19 +00:00
|
|
|
searchInProtectedClass: false
|
2019-01-30 16:36:14 +00:00
|
|
|
UndocumentedPublicFunction:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2023-05-12 04:50:19 +00:00
|
|
|
searchProtectedFunction: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UndocumentedPublicProperty:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2023-05-12 04:50:19 +00:00
|
|
|
searchProtectedProperty: false
|
2019-01-30 16:36:14 +00:00
|
|
|
|
|
|
|
complexity:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
CognitiveComplexMethod:
|
|
|
|
active: false
|
|
|
|
threshold: 15
|
2019-01-30 16:36:14 +00:00
|
|
|
ComplexCondition:
|
|
|
|
active: true
|
|
|
|
threshold: 4
|
|
|
|
ComplexInterface:
|
|
|
|
active: false
|
|
|
|
threshold: 10
|
|
|
|
includeStaticDeclarations: false
|
2022-01-08 19:23:08 +00:00
|
|
|
includePrivateDeclarations: false
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreOverloaded: false
|
|
|
|
CyclomaticComplexMethod:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
threshold: 18 # (Default: 15) Increased in https://github.com/mozilla-mobile/android-components/pull/10328
|
|
|
|
ignoreSingleWhenExpression: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/3271
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreSimpleWhenEntries: false
|
|
|
|
ignoreNestingFunctions: false
|
|
|
|
nestingFunctions:
|
|
|
|
- 'also'
|
|
|
|
- 'apply'
|
|
|
|
- 'forEach'
|
|
|
|
- 'isNotNull'
|
|
|
|
- 'ifNull'
|
|
|
|
- 'let'
|
|
|
|
- 'run'
|
|
|
|
- 'use'
|
|
|
|
- 'with'
|
2019-01-30 16:36:14 +00:00
|
|
|
LabeledExpression:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoredLabels: []
|
2019-01-30 16:36:14 +00:00
|
|
|
LargeClass:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
threshold: 600
|
2019-01-30 16:36:14 +00:00
|
|
|
LongMethod:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
threshold: 75 # (Default: 60) Increased in https://github.com/mozilla-mobile/android-components/issues/6350
|
2019-01-30 16:36:14 +00:00
|
|
|
LongParameterList:
|
2020-08-11 21:24:38 +00:00
|
|
|
active: true
|
2020-07-27 16:48:41 +00:00
|
|
|
functionThreshold: 6
|
|
|
|
constructorThreshold: 7
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreDefaultParameters: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/10835
|
2020-07-27 16:48:41 +00:00
|
|
|
ignoreDataClasses: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreAnnotatedParameter: []
|
2019-01-30 16:36:14 +00:00
|
|
|
MethodOverloading:
|
|
|
|
active: false
|
|
|
|
threshold: 6
|
2022-01-08 19:23:08 +00:00
|
|
|
NamedArguments:
|
|
|
|
active: false
|
|
|
|
threshold: 3
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreArgumentsMatchingNames: false
|
2019-01-30 16:36:14 +00:00
|
|
|
NestedBlockDepth:
|
|
|
|
active: true
|
|
|
|
threshold: 4
|
2023-05-12 04:50:19 +00:00
|
|
|
NestedScopeFunctions:
|
|
|
|
active: false
|
|
|
|
threshold: 1
|
|
|
|
functions:
|
|
|
|
- 'kotlin.apply'
|
|
|
|
- 'kotlin.run'
|
|
|
|
- 'kotlin.with'
|
|
|
|
- 'kotlin.let'
|
|
|
|
- 'kotlin.also'
|
2022-01-08 19:23:08 +00:00
|
|
|
ReplaceSafeCallChainWithRun:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
StringLiteralDuplication:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
threshold: 3
|
|
|
|
ignoreAnnotation: true
|
|
|
|
excludeStringsWithLessThan5Characters: true
|
|
|
|
ignoreStringsRegex: '$^'
|
|
|
|
TooManyFunctions:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2023-05-12 04:50:19 +00:00
|
|
|
thresholdInFiles: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927
|
|
|
|
thresholdInClasses: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927
|
|
|
|
thresholdInInterfaces: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927
|
|
|
|
thresholdInObjects: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927
|
2019-01-30 16:36:14 +00:00
|
|
|
thresholdInEnums: 11
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreDeprecated: false
|
|
|
|
ignorePrivate: false
|
|
|
|
ignoreOverridden: false
|
|
|
|
|
|
|
|
coroutines:
|
|
|
|
active: true
|
|
|
|
GlobalCoroutineUsage:
|
|
|
|
active: false
|
|
|
|
InjectDispatcher:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
dispatcherNames:
|
|
|
|
- 'IO'
|
|
|
|
- 'Default'
|
|
|
|
- 'Unconfined'
|
|
|
|
RedundantSuspendModifier:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
SleepInsteadOfDelay:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2023-05-25 19:40:54 +00:00
|
|
|
SuspendFunSwallowedCancellation:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
SuspendFunWithCoroutineScopeReceiver:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: false
|
|
|
|
SuspendFunWithFlowReturnType:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
|
|
|
|
empty-blocks:
|
|
|
|
active: true
|
|
|
|
EmptyCatchBlock:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
2019-01-30 16:36:14 +00:00
|
|
|
EmptyClassBlock:
|
|
|
|
active: true
|
|
|
|
EmptyDefaultConstructor:
|
|
|
|
active: true
|
|
|
|
EmptyDoWhileBlock:
|
|
|
|
active: true
|
|
|
|
EmptyElseBlock:
|
|
|
|
active: true
|
|
|
|
EmptyFinallyBlock:
|
|
|
|
active: true
|
|
|
|
EmptyForBlock:
|
|
|
|
active: true
|
|
|
|
EmptyFunctionBlock:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreOverridden: false
|
2019-01-30 16:36:14 +00:00
|
|
|
EmptyIfBlock:
|
|
|
|
active: true
|
|
|
|
EmptyInitBlock:
|
|
|
|
active: true
|
|
|
|
EmptyKtFile:
|
|
|
|
active: true
|
|
|
|
EmptySecondaryConstructor:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
EmptyTryBlock:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
EmptyWhenBlock:
|
|
|
|
active: true
|
|
|
|
EmptyWhileBlock:
|
|
|
|
active: true
|
|
|
|
|
|
|
|
exceptions:
|
|
|
|
active: true
|
|
|
|
ExceptionRaisedInUnexpectedLocation:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
methodNames:
|
|
|
|
- 'equals'
|
|
|
|
- 'finalize'
|
|
|
|
- 'hashCode'
|
|
|
|
- 'toString'
|
2019-01-30 16:36:14 +00:00
|
|
|
InstanceOfCheckForException:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
NotImplementedDeclaration:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
ObjectExtendsThrowable:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
PrintStackTrace:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
RethrowCaughtException:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
ReturnFromFinally:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
|
|
|
ignoreLabeled: false
|
2019-01-30 16:36:14 +00:00
|
|
|
SwallowedException:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoredExceptionTypes:
|
|
|
|
- 'InterruptedException'
|
|
|
|
- 'MalformedURLException'
|
|
|
|
- 'NumberFormatException'
|
|
|
|
- 'ParseException'
|
|
|
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
2019-01-30 16:36:14 +00:00
|
|
|
ThrowingExceptionFromFinally:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
ThrowingExceptionInMain:
|
|
|
|
active: false
|
|
|
|
ThrowingExceptionsWithoutMessageOrCause:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2022-01-08 19:23:08 +00:00
|
|
|
exceptions:
|
|
|
|
- 'ArrayIndexOutOfBoundsException'
|
|
|
|
- 'Exception'
|
|
|
|
- 'IllegalArgumentException'
|
|
|
|
- 'IllegalMonitorStateException'
|
|
|
|
- 'IllegalStateException'
|
|
|
|
- 'IndexOutOfBoundsException'
|
|
|
|
- 'NullPointerException'
|
|
|
|
- 'RuntimeException'
|
|
|
|
- 'Throwable'
|
2019-01-30 16:36:14 +00:00
|
|
|
ThrowingNewInstanceOfSameException:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
TooGenericExceptionCaught:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
exceptionNames:
|
2022-01-08 19:23:08 +00:00
|
|
|
- 'ArrayIndexOutOfBoundsException'
|
|
|
|
- 'Error'
|
|
|
|
- 'Exception'
|
|
|
|
- 'IllegalMonitorStateException'
|
|
|
|
- 'IndexOutOfBoundsException'
|
|
|
|
- 'NullPointerException'
|
|
|
|
- 'RuntimeException'
|
|
|
|
- 'Throwable'
|
|
|
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
2019-01-30 16:36:14 +00:00
|
|
|
TooGenericExceptionThrown:
|
|
|
|
active: true
|
|
|
|
exceptionNames:
|
2022-01-08 19:23:08 +00:00
|
|
|
- 'Error'
|
|
|
|
- 'Exception'
|
|
|
|
- 'RuntimeException'
|
|
|
|
- 'Throwable'
|
2020-04-01 22:42:46 +00:00
|
|
|
|
2019-01-30 16:36:14 +00:00
|
|
|
naming:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
BooleanPropertyNaming:
|
|
|
|
active: false
|
|
|
|
allowedPattern: '^(is|has|are)'
|
2019-01-30 16:36:14 +00:00
|
|
|
ClassNaming:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
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: '$^'
|
2019-01-30 16:36:14 +00:00
|
|
|
EnumNaming:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
|
2019-01-30 16:36:14 +00:00
|
|
|
ForbiddenClassName:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
forbiddenName: []
|
2019-01-30 16:36:14 +00:00
|
|
|
FunctionMaxLength:
|
|
|
|
active: false
|
|
|
|
maximumFunctionNameLength: 30
|
|
|
|
FunctionMinLength:
|
|
|
|
active: false
|
|
|
|
minimumFunctionNameLength: 3
|
|
|
|
FunctionNaming:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2023-05-12 04:50:19 +00:00
|
|
|
functionPattern: '[a-z][a-zA-Z0-9]*'
|
2022-01-08 19:23:08 +00:00
|
|
|
excludeClassPattern: '$^'
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866
|
2022-01-08 19:23:08 +00:00
|
|
|
FunctionParameterNaming:
|
|
|
|
active: true
|
|
|
|
parameterPattern: '[a-z][A-Za-z0-9]*'
|
2019-01-30 16:36:14 +00:00
|
|
|
excludeClassPattern: '$^'
|
2022-01-08 19:23:08 +00:00
|
|
|
InvalidPackageDeclaration:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
rootPackage: ''
|
2023-05-12 04:50:19 +00:00
|
|
|
requireRootInDeclaration: false
|
2022-01-08 19:23:08 +00:00
|
|
|
LambdaParameterNaming:
|
|
|
|
active: false
|
|
|
|
parameterPattern: '[a-z][A-Za-z0-9]*|_'
|
2019-01-30 16:36:14 +00:00
|
|
|
MatchingDeclarationName:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
mustBeFirst: true
|
2019-01-30 16:36:14 +00:00
|
|
|
MemberNameEqualsClassName:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2020-04-01 22:42:46 +00:00
|
|
|
ignoreOverridden: true
|
2022-01-08 19:23:08 +00:00
|
|
|
NoNameShadowing:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
NonBooleanPropertyPrefixedWithIs:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
ObjectPropertyNaming:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
2019-01-30 16:36:14 +00:00
|
|
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
2022-01-08 19:23:08 +00:00
|
|
|
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
|
2019-01-30 16:36:14 +00:00
|
|
|
PackageNaming:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
|
2019-01-30 16:36:14 +00:00
|
|
|
TopLevelPropertyNaming:
|
|
|
|
active: true
|
|
|
|
constantPattern: '[A-Z][_A-Z0-9]*'
|
2022-01-08 19:23:08 +00:00
|
|
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
|
|
|
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
|
2019-01-30 16:36:14 +00:00
|
|
|
VariableMaxLength:
|
|
|
|
active: false
|
|
|
|
maximumVariableNameLength: 64
|
|
|
|
VariableMinLength:
|
|
|
|
active: false
|
|
|
|
minimumVariableNameLength: 1
|
|
|
|
VariableNaming:
|
|
|
|
active: true
|
|
|
|
variablePattern: '[a-z][A-Za-z0-9]*'
|
|
|
|
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
|
|
|
|
excludeClassPattern: '$^'
|
|
|
|
|
|
|
|
performance:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ArrayPrimitive:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
CouldBeSequence:
|
|
|
|
active: false
|
|
|
|
threshold: 3
|
2019-01-30 16:36:14 +00:00
|
|
|
ForEachOnRange:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
SpreadOperator:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2023-05-12 04:50:19 +00:00
|
|
|
UnnecessaryPartOfBinaryExpression:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
UnnecessaryTemporaryInstantiation:
|
|
|
|
active: true
|
|
|
|
|
|
|
|
potential-bugs:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
AvoidReferentialEquality:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
forbiddenTypePatterns:
|
|
|
|
- 'kotlin.String'
|
2023-05-25 19:40:54 +00:00
|
|
|
CastNullableToNonNullableType:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
CastToNullableType:
|
|
|
|
active: false
|
|
|
|
Deprecation:
|
|
|
|
active: false
|
|
|
|
DontDowncastCollectionTypes:
|
|
|
|
active: false
|
|
|
|
DoubleMutabilityForCollection:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
mutableTypes:
|
|
|
|
- 'kotlin.collections.MutableList'
|
|
|
|
- 'kotlin.collections.MutableMap'
|
|
|
|
- 'kotlin.collections.MutableSet'
|
|
|
|
- 'java.util.ArrayList'
|
|
|
|
- 'java.util.LinkedHashSet'
|
|
|
|
- 'java.util.HashSet'
|
|
|
|
- 'java.util.LinkedHashMap'
|
|
|
|
- 'java.util.HashMap'
|
|
|
|
ElseCaseInsteadOfExhaustiveWhen:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
ignoredSubjectTypes: []
|
2019-01-30 16:36:14 +00:00
|
|
|
EqualsAlwaysReturnsTrueOrFalse:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
EqualsWithHashCodeExist:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ExitOutsideMain:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
ExplicitGarbageCollectionCall:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
HasPlatformType:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
IgnoredReturnValue:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
|
|
|
restrictToConfig: true
|
2022-01-08 19:23:08 +00:00
|
|
|
returnValueAnnotations:
|
2023-05-25 19:40:54 +00:00
|
|
|
- 'CheckResult'
|
2022-01-08 19:23:08 +00:00
|
|
|
- '*.CheckResult'
|
2023-05-25 19:40:54 +00:00
|
|
|
- 'CheckReturnValue'
|
2022-01-08 19:23:08 +00:00
|
|
|
- '*.CheckReturnValue'
|
|
|
|
ignoreReturnValueAnnotations:
|
2023-05-25 19:40:54 +00:00
|
|
|
- 'CanIgnoreReturnValue'
|
2022-01-08 19:23:08 +00:00
|
|
|
- '*.CanIgnoreReturnValue'
|
2023-05-12 04:50:19 +00:00
|
|
|
returnValueTypes:
|
|
|
|
- 'kotlin.sequences.Sequence'
|
|
|
|
- 'kotlinx.coroutines.flow.*Flow'
|
|
|
|
- 'java.util.stream.*Stream'
|
|
|
|
ignoreFunctionCall: []
|
2022-01-08 19:23:08 +00:00
|
|
|
ImplicitDefaultLocale:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
ImplicitUnitReturnType:
|
|
|
|
active: false
|
|
|
|
allowExplicitReturnType: true
|
|
|
|
InvalidRange:
|
|
|
|
active: true
|
|
|
|
IteratorHasNextCallsNextMethod:
|
|
|
|
active: true
|
|
|
|
IteratorNotThrowingNoSuchElementException:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
LateinitUsage:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreOnClassesPattern: ''
|
|
|
|
MapGetWithNotNullAssertionOperator:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
MissingPackageDeclaration:
|
|
|
|
active: false
|
|
|
|
excludes: ['**/*.kts']
|
2023-05-12 04:50:19 +00:00
|
|
|
NullCheckOnMutableProperty:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
NullableToStringCall:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
PropertyUsedBeforeDeclaration:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
UnconditionalJumpStatementInLoop:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
UnnecessaryNotNullCheck:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UnnecessaryNotNullOperator:
|
|
|
|
active: true
|
|
|
|
UnnecessarySafeCall:
|
|
|
|
active: true
|
|
|
|
UnreachableCatchBlock:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
UnreachableCode:
|
|
|
|
active: true
|
|
|
|
UnsafeCallOnNullableType:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**']
|
2019-01-30 16:36:14 +00:00
|
|
|
UnsafeCast:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
|
|
|
UnusedUnaryOperator:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
UselessPostfixExpression:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
WrongEqualsTypeParameter:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
|
|
|
|
style:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
AlsoCouldBeApply:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
BracesOnIfStatements:
|
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/1015
|
|
|
|
singleLine: 'consistent' # (Default: never)
|
|
|
|
multiLine: 'always'
|
|
|
|
BracesOnWhenStatements:
|
|
|
|
active: false
|
|
|
|
singleLine: 'necessary'
|
|
|
|
multiLine: 'consistent'
|
2023-05-12 04:50:19 +00:00
|
|
|
CanBeNonNullable:
|
|
|
|
active: false
|
|
|
|
CascadingCallWrapping:
|
|
|
|
active: false
|
|
|
|
includeElvis: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ClassOrdering:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
CollapsibleIfStatements:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78
|
2019-01-30 16:36:14 +00:00
|
|
|
DataClassContainsFunctions:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
conversionFunctionPrefix:
|
|
|
|
- 'to'
|
2023-05-25 19:40:54 +00:00
|
|
|
allowOperators: false
|
2022-01-08 19:23:08 +00:00
|
|
|
DataClassShouldBeImmutable:
|
|
|
|
active: false
|
|
|
|
DestructuringDeclarationWithTooManyEntries:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
maxDestructuringEntries: 3
|
2023-05-25 19:40:54 +00:00
|
|
|
DoubleNegativeLambda:
|
|
|
|
active: false
|
|
|
|
negativeFunctions:
|
|
|
|
- reason: 'Use `takeIf` instead.'
|
|
|
|
value: 'takeUnless'
|
|
|
|
- reason: 'Use `all` instead.'
|
|
|
|
value: 'none'
|
|
|
|
negativeFunctionNameParts:
|
|
|
|
- 'not'
|
|
|
|
- 'non'
|
2019-01-30 16:36:14 +00:00
|
|
|
EqualsNullCall:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
|
|
|
EqualsOnSignatureLine:
|
|
|
|
active: false
|
|
|
|
ExplicitCollectionElementAccessMethod:
|
|
|
|
active: false
|
|
|
|
ExplicitItLambdaParameter:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
ExpressionBodySyntax:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
includeLineWrapping: false
|
2023-05-25 19:40:54 +00:00
|
|
|
ForbiddenAnnotation:
|
|
|
|
active: false
|
|
|
|
annotations:
|
|
|
|
- reason: 'it is a java annotation. Use `Suppress` instead.'
|
|
|
|
value: 'java.lang.SuppressWarnings'
|
|
|
|
- reason: 'it is a java annotation. Use `kotlin.Deprecated` instead.'
|
|
|
|
value: 'java.lang.Deprecated'
|
|
|
|
- reason: 'it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead.'
|
|
|
|
value: 'java.lang.annotation.Documented'
|
|
|
|
- reason: 'it is a java annotation. Use `kotlin.annotation.Target` instead.'
|
|
|
|
value: 'java.lang.annotation.Target'
|
|
|
|
- reason: 'it is a java annotation. Use `kotlin.annotation.Retention` instead.'
|
|
|
|
value: 'java.lang.annotation.Retention'
|
|
|
|
- reason: 'it is a java annotation. Use `kotlin.annotation.Repeatable` instead.'
|
|
|
|
value: 'java.lang.annotation.Repeatable'
|
|
|
|
- reason: 'Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265'
|
|
|
|
value: 'java.lang.annotation.Inherited'
|
2019-01-30 16:36:14 +00:00
|
|
|
ForbiddenComment:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
comments:
|
|
|
|
- reason: 'Forbidden FIXME todo marker in comment, please fix the problem.'
|
|
|
|
value: 'FIXME:'
|
|
|
|
- reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
|
|
|
|
value: 'STOPSHIP:'
|
|
|
|
- reason: 'Forbidden TODO todo marker in comment, please do the changes.'
|
|
|
|
value: 'TODO:'
|
2022-01-08 19:23:08 +00:00
|
|
|
allowedPatterns: ''
|
2019-01-30 16:36:14 +00:00
|
|
|
ForbiddenImport:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
imports: []
|
|
|
|
forbiddenPatterns: ''
|
|
|
|
ForbiddenMethodCall:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
methods:
|
2023-05-12 04:50:19 +00:00
|
|
|
- reason: 'print does not allow you to configure the output stream. Use a logger instead.'
|
|
|
|
value: 'kotlin.io.print'
|
|
|
|
- reason: 'println does not allow you to configure the output stream. Use a logger instead.'
|
|
|
|
value: 'kotlin.io.println'
|
|
|
|
ForbiddenSuppress:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
rules: []
|
|
|
|
ForbiddenVoid:
|
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreOverridden: false
|
|
|
|
ignoreUsageInGenerics: false
|
|
|
|
FunctionOnlyReturningConstant:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
ignoreOverridableFunction: true
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreActualFunction: true
|
2023-05-12 04:50:19 +00:00
|
|
|
excludedFunctions: []
|
2019-01-30 16:36:14 +00:00
|
|
|
LoopWithTooManyJumpStatements:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
maxJumpCount: 1
|
|
|
|
MagicNumber:
|
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts']
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreNumbers:
|
|
|
|
- '-1'
|
|
|
|
- '0'
|
|
|
|
- '1'
|
|
|
|
- '2'
|
|
|
|
ignoreHashCodeFunction: true
|
2023-05-12 04:50:19 +00:00
|
|
|
ignorePropertyDeclaration: true # Enabled for Compose in https://github.com/mozilla-mobile/android-components/issues/11864
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreLocalVariableDeclaration: false
|
2019-01-30 16:36:14 +00:00
|
|
|
ignoreConstantDeclaration: true
|
|
|
|
ignoreCompanionObjectPropertyDeclaration: true
|
|
|
|
ignoreAnnotation: false
|
|
|
|
ignoreNamedArgument: true
|
|
|
|
ignoreEnums: false
|
2022-01-08 19:23:08 +00:00
|
|
|
ignoreRanges: false
|
|
|
|
ignoreExtensionFunctions: true
|
|
|
|
MandatoryBracesLoops:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
MaxChainedCallsOnSameLine:
|
|
|
|
active: false
|
|
|
|
maxChainedCalls: 5
|
2019-01-30 16:36:14 +00:00
|
|
|
MaxLineLength:
|
|
|
|
active: true
|
|
|
|
maxLineLength: 120
|
2022-01-08 19:23:08 +00:00
|
|
|
excludePackageStatements: true
|
|
|
|
excludeImportStatements: true
|
|
|
|
excludeCommentStatements: false
|
2023-05-12 04:50:19 +00:00
|
|
|
excludeRawStrings: true
|
2019-01-30 16:36:14 +00:00
|
|
|
MayBeConst:
|
|
|
|
active: true
|
|
|
|
ModifierOrder:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
MultilineLambdaItParameter:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
MultilineRawStringIndentation:
|
|
|
|
active: false
|
|
|
|
indentSize: 4
|
2023-05-25 19:40:54 +00:00
|
|
|
trimmingMethods:
|
|
|
|
- 'trimIndent'
|
|
|
|
- 'trimMargin'
|
2022-01-08 19:23:08 +00:00
|
|
|
NestedClassesVisibility:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
NewLineAtEndOfFile:
|
|
|
|
active: true
|
|
|
|
NoTabs:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78
|
|
|
|
NullableBooleanCheck:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
ObjectLiteralToLambda:
|
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
OptionalAbstractKeyword:
|
|
|
|
active: true
|
|
|
|
OptionalUnit:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
PreferToOverPairSyntax:
|
|
|
|
active: false
|
2019-01-30 16:36:14 +00:00
|
|
|
ProtectedMemberInFinalClass:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
|
|
|
RedundantExplicitType:
|
|
|
|
active: false
|
|
|
|
RedundantHigherOrderMapUsage:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
RedundantVisibilityModifierRule:
|
|
|
|
active: false
|
|
|
|
ReturnCount:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
max: 3 # (Default: 2) Increased in https://github.com/mozilla-mobile/android-components/issues/3
|
|
|
|
excludedFunctions:
|
|
|
|
- 'equals'
|
2022-01-08 19:23:08 +00:00
|
|
|
excludeLabeled: false
|
|
|
|
excludeReturnFromLambda: true
|
|
|
|
excludeGuardClauses: false
|
2019-01-30 16:36:14 +00:00
|
|
|
SafeCast:
|
|
|
|
active: true
|
|
|
|
SerialVersionUIDInSerializableClass:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
SpacingBetweenPackageAndImports:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78
|
2023-05-25 19:40:54 +00:00
|
|
|
StringShouldBeRawString:
|
|
|
|
active: false
|
|
|
|
maxEscapedCharacterCount: 2
|
|
|
|
ignoredCharacters: []
|
2019-01-30 16:36:14 +00:00
|
|
|
ThrowsCount:
|
|
|
|
active: true
|
|
|
|
max: 2
|
2022-01-08 19:23:08 +00:00
|
|
|
excludeGuardClauses: false
|
2019-01-30 16:36:14 +00:00
|
|
|
TrailingWhitespace:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
TrimMultilineRawString:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
trimmingMethods:
|
|
|
|
- 'trimIndent'
|
|
|
|
- 'trimMargin'
|
2022-01-08 19:23:08 +00:00
|
|
|
UnderscoresInNumericLiterals:
|
|
|
|
active: false
|
|
|
|
acceptableLength: 4
|
2023-05-12 04:50:19 +00:00
|
|
|
allowNonStandardGrouping: false
|
2019-01-30 16:36:14 +00:00
|
|
|
UnnecessaryAbstractClass:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
UnnecessaryAnnotationUseSiteTarget:
|
|
|
|
active: false
|
|
|
|
UnnecessaryApply:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
UnnecessaryBackticks:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
UnnecessaryBracesAroundTrailingLambda:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
UnnecessaryFilter:
|
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
UnnecessaryInheritance:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
UnnecessaryInnerClass:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UnnecessaryLet:
|
2019-01-30 16:36:14 +00:00
|
|
|
active: false
|
|
|
|
UnnecessaryParentheses:
|
|
|
|
active: false
|
2023-05-12 04:50:19 +00:00
|
|
|
allowForUnclearPrecedence: false
|
2019-01-30 16:36:14 +00:00
|
|
|
UntilInsteadOfRangeTo:
|
|
|
|
active: false
|
|
|
|
UnusedImports:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
UnusedParameter:
|
|
|
|
active: true
|
|
|
|
allowedNames: 'ignored|expected'
|
2022-01-08 19:23:08 +00:00
|
|
|
UnusedPrivateClass:
|
|
|
|
active: true
|
2019-01-30 16:36:14 +00:00
|
|
|
UnusedPrivateMember:
|
2022-01-08 19:23:08 +00:00
|
|
|
active: true
|
2023-05-25 19:40:54 +00:00
|
|
|
allowedNames: ''
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866
|
2023-05-25 19:40:54 +00:00
|
|
|
UnusedPrivateProperty:
|
|
|
|
active: true
|
|
|
|
allowedNames: '_|ignored|expected|serialVersionUID'
|
2022-01-08 19:23:08 +00:00
|
|
|
UseAnyOrNoneInsteadOfFind:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
UseArrayLiteralsInAnnotations:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2022-01-08 19:23:08 +00:00
|
|
|
UseCheckNotNull:
|
|
|
|
active: true
|
|
|
|
UseCheckOrError:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2019-01-30 16:36:14 +00:00
|
|
|
UseDataClass:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
allowVars: false
|
|
|
|
UseEmptyCounterpart:
|
|
|
|
active: false
|
|
|
|
UseIfEmptyOrIfBlank:
|
|
|
|
active: false
|
|
|
|
UseIfInsteadOfWhen:
|
|
|
|
active: false
|
2023-05-25 19:40:54 +00:00
|
|
|
ignoreWhenContainingVariableDeclaration: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UseIsNullOrEmpty:
|
2023-05-12 04:50:19 +00:00
|
|
|
active: false # (Default: true)
|
2023-05-25 19:40:54 +00:00
|
|
|
UseLet:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UseOrEmpty:
|
|
|
|
active: true
|
|
|
|
UseRequire:
|
|
|
|
active: true
|
|
|
|
UseRequireNotNull:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
UseSumOfInsteadOfFlatMapSize:
|
|
|
|
active: false
|
2022-01-08 19:23:08 +00:00
|
|
|
UselessCallOnNotNull:
|
|
|
|
active: true
|
|
|
|
UtilityClassWithPublicConstructor:
|
|
|
|
active: true
|
|
|
|
VarCouldBeVal:
|
|
|
|
active: true
|
2023-05-12 04:50:19 +00:00
|
|
|
ignoreLateinitVar: false
|
2019-01-30 16:36:14 +00:00
|
|
|
WildcardImport:
|
|
|
|
active: true
|
2022-01-08 19:23:08 +00:00
|
|
|
excludeImports:
|
|
|
|
- 'java.util.*'
|
2022-12-11 22:27:04 +00:00
|
|
|
|
|
|
|
# Custom Rules
|
|
|
|
|
|
|
|
mozilla-detekt-rules:
|
|
|
|
active: true
|
|
|
|
MozillaBannedPropertyAccess:
|
|
|
|
active: true
|
|
|
|
# BuildConfig.Debug: This property tests whether the application was built
|
|
|
|
# with the debuggable flag or not. Use a check for different build variants,
|
|
|
|
# instead.
|
|
|
|
bannedProperties: 'BuildConfig.DEBUG'
|
|
|
|
MozillaStrictModeSuppression:
|
|
|
|
active: true
|
|
|
|
MozillaCorrectUnitTestRunner:
|
|
|
|
active: true
|
|
|
|
MozillaRunBlockingCheck:
|
|
|
|
active: true
|
|
|
|
MozillaUseLazyMonitored:
|
|
|
|
active: true
|