[#90] Detekt 1.21.0
This commit is contained in:
parent
db368ee2b7
commit
915167f500
|
@ -141,9 +141,11 @@ object Mnemonics {
|
||||||
* Get the original entropy that was used to create this MnemonicCode. This call will fail
|
* Get the original entropy that was used to create this MnemonicCode. This call will fail
|
||||||
* if the words have an invalid length or checksum.
|
* if the words have an invalid length or checksum.
|
||||||
*
|
*
|
||||||
|
* @InvalidWordException If any word isn't in the word list
|
||||||
* @throws WordCountException when the word count is zero or not a multiple of 3.
|
* @throws WordCountException when the word count is zero or not a multiple of 3.
|
||||||
* @throws ChecksumException if the checksum does not match the expected value.
|
* @throws ChecksumException if the checksum does not match the expected value.
|
||||||
*/
|
*/
|
||||||
|
@Suppress("ThrowsCount", "NestedBlockDepth")
|
||||||
fun toEntropy(): ByteArray {
|
fun toEntropy(): ByteArray {
|
||||||
wordCount.let { if (it <= 0 || it % 3 > 0) throw WordCountException(wordCount) }
|
wordCount.let { if (it <= 0 || it % 3 > 0) throw WordCountException(wordCount) }
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ class WordList internal constructor(val languageCode: String) {
|
||||||
*
|
*
|
||||||
* @return a list of words matching the given language code.
|
* @return a list of words matching the given language code.
|
||||||
*/
|
*/
|
||||||
|
@Suppress("LongMethod")
|
||||||
private fun fetchWords(languageCode: String): List<String> {
|
private fun fetchWords(languageCode: String): List<String> {
|
||||||
validate(languageCode)
|
validate(languageCode)
|
||||||
return """
|
return """
|
||||||
|
|
|
@ -15,9 +15,8 @@ com.thoughtworks.xstream:xstream:1.4.17=classpath
|
||||||
de.undercouch:gradle-download-task:4.1.1=classpath
|
de.undercouch:gradle-download-task:4.1.1=classpath
|
||||||
io.github.detekt.sarif4k:sarif4k:0.0.1=classpath
|
io.github.detekt.sarif4k:sarif4k:0.0.1=classpath
|
||||||
io.github.x-stream:mxparser:1.2.1=classpath
|
io.github.x-stream:mxparser:1.2.1=classpath
|
||||||
io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.20.0=classpath
|
io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0=classpath
|
||||||
io.gitlab.arturbosch.detekt:detekt-utils:1.20.0=classpath
|
io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.21.0=classpath
|
||||||
io.gitlab.arturbosch.detekt:io.gitlab.arturbosch.detekt.gradle.plugin:1.20.0=classpath
|
|
||||||
net.java.dev.jna:jna:5.6.0=classpath
|
net.java.dev.jna:jna:5.6.0=classpath
|
||||||
org.checkerframework:checker-qual:2.11.1=classpath
|
org.checkerframework:checker-qual:2.11.1=classpath
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath
|
||||||
|
|
|
@ -17,30 +17,32 @@ com.pinterest.ktlint:ktlint-ruleset-standard:0.46.1=ktlint
|
||||||
com.pinterest.ktlint:ktlint-ruleset-test:0.46.1=ktlint
|
com.pinterest.ktlint:ktlint-ruleset-test:0.46.1=ktlint
|
||||||
com.pinterest:ktlint:0.46.1=ktlint
|
com.pinterest:ktlint:0.46.1=ktlint
|
||||||
info.picocli:picocli:4.6.3=ktlint
|
info.picocli:picocli:4.6.3=ktlint
|
||||||
|
io.github.davidburstrom.contester:contester-breakpoint:0.2.0=detekt
|
||||||
io.github.detekt.sarif4k:sarif4k:0.0.1=detekt,ktlint
|
io.github.detekt.sarif4k:sarif4k:0.0.1=detekt,ktlint
|
||||||
io.github.microutils:kotlin-logging-jvm:2.1.21=ktlint
|
io.github.microutils:kotlin-logging-jvm:2.1.21=ktlint
|
||||||
io.gitlab.arturbosch.detekt:detekt-api:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-api:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-cli:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-cli:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-core:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-core:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-metrics:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-metrics:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-parser:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-parser:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-psi-utils:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-psi-utils:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-report-html:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-report-html:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-report-sarif:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-report-md:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-report-txt:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-report-sarif:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-report-xml:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-report-txt:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-complexity:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-report-xml:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-coroutines:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-complexity:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-documentation:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-coroutines:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-empty:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-documentation:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-errorprone:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-empty:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-exceptions:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-errorprone:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-naming:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-exceptions:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-performance:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-naming:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules-style:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-performance:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-rules:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules-style:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-tooling:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-rules:1.21.0=detekt
|
||||||
io.gitlab.arturbosch.detekt:detekt-utils:1.20.0=detekt
|
io.gitlab.arturbosch.detekt:detekt-tooling:1.21.0=detekt
|
||||||
|
io.gitlab.arturbosch.detekt:detekt-utils:1.21.0=detekt
|
||||||
net.java.dev.jna:jna:5.6.0=detekt,ktlint
|
net.java.dev.jna:jna:5.6.0=detekt,ktlint
|
||||||
org.ec4j.core:ec4j-core:0.3.0=ktlint
|
org.ec4j.core:ec4j-core:0.3.0=ktlint
|
||||||
org.freemarker:freemarker:2.3.30=IntellijKoverConfig
|
org.freemarker:freemarker:2.3.30=IntellijKoverConfig
|
||||||
|
@ -52,19 +54,19 @@ org.jetbrains.intellij.deps:coverage-report:1.0.15=IntellijKoverConfig
|
||||||
org.jetbrains.intellij.deps:intellij-coverage-agent:1.0.668=IntellijKoverConfig
|
org.jetbrains.intellij.deps:intellij-coverage-agent:1.0.668=IntellijKoverConfig
|
||||||
org.jetbrains.intellij.deps:intellij-coverage-reporter:1.0.668=IntellijKoverConfig
|
org.jetbrains.intellij.deps:intellij-coverage-reporter:1.0.668=IntellijKoverConfig
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=detekt,ktlint
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=detekt,ktlint
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-reflect:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-reflect:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-script-runtime:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-script-runtime:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0=ktlint
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.6.20=detekt
|
org.jetbrains.kotlin:kotlin-stdlib:1.6.21=detekt
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.0=ktlint
|
org.jetbrains.kotlin:kotlin-stdlib:1.7.0=ktlint
|
||||||
org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.5=detekt
|
org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.5=detekt
|
||||||
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0=detekt,ktlint
|
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0=detekt,ktlint
|
||||||
|
|
|
@ -13,7 +13,7 @@ moshi-core = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
|
||||||
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
|
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
detekt = "io.gitlab.arturbosch.detekt:1.20.0"
|
detekt = "io.gitlab.arturbosch.detekt:1.21.0"
|
||||||
dokka = "org.jetbrains.dokka:1.7.10"
|
dokka = "org.jetbrains.dokka:1.7.10"
|
||||||
kover = "org.jetbrains.kotlinx.kover:0.5.1"
|
kover = "org.jetbrains.kotlinx.kover:0.5.1"
|
||||||
versions = "com.github.ben-manes.versions:0.42.0"
|
versions = "com.github.ben-manes.versions:0.42.0"
|
111
tools/detekt.yml
111
tools/detekt.yml
|
@ -46,6 +46,7 @@ output-reports:
|
||||||
# - 'TxtOutputReport'
|
# - 'TxtOutputReport'
|
||||||
# - 'XmlOutputReport'
|
# - 'XmlOutputReport'
|
||||||
# - 'HtmlOutputReport'
|
# - 'HtmlOutputReport'
|
||||||
|
# - 'MdOutputReport'
|
||||||
|
|
||||||
comments:
|
comments:
|
||||||
active: true
|
active: true
|
||||||
|
@ -62,6 +63,9 @@ comments:
|
||||||
EndOfSentenceFormat:
|
EndOfSentenceFormat:
|
||||||
active: false
|
active: false
|
||||||
endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
|
endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
|
||||||
|
KDocReferencesNonPublicProperty:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
OutdatedDocumentation:
|
OutdatedDocumentation:
|
||||||
active: false
|
active: false
|
||||||
matchTypeParameters: true
|
matchTypeParameters: true
|
||||||
|
@ -133,6 +137,15 @@ complexity:
|
||||||
NestedBlockDepth:
|
NestedBlockDepth:
|
||||||
active: true
|
active: true
|
||||||
threshold: 4
|
threshold: 4
|
||||||
|
NestedScopeFunctions:
|
||||||
|
active: false
|
||||||
|
threshold: 1
|
||||||
|
functions:
|
||||||
|
- 'kotlin.apply'
|
||||||
|
- 'kotlin.run'
|
||||||
|
- 'kotlin.with'
|
||||||
|
- 'kotlin.let'
|
||||||
|
- 'kotlin.also'
|
||||||
ReplaceSafeCallChainWithRun:
|
ReplaceSafeCallChainWithRun:
|
||||||
active: false
|
active: false
|
||||||
StringLiteralDuplication:
|
StringLiteralDuplication:
|
||||||
|
@ -159,19 +172,19 @@ coroutines:
|
||||||
GlobalCoroutineUsage:
|
GlobalCoroutineUsage:
|
||||||
active: false
|
active: false
|
||||||
InjectDispatcher:
|
InjectDispatcher:
|
||||||
active: false
|
active: true
|
||||||
dispatcherNames:
|
dispatcherNames:
|
||||||
- 'IO'
|
- 'IO'
|
||||||
- 'Default'
|
- 'Default'
|
||||||
- 'Unconfined'
|
- 'Unconfined'
|
||||||
RedundantSuspendModifier:
|
RedundantSuspendModifier:
|
||||||
active: false
|
active: true
|
||||||
SleepInsteadOfDelay:
|
SleepInsteadOfDelay:
|
||||||
active: false
|
active: true
|
||||||
SuspendFunWithCoroutineScopeReceiver:
|
SuspendFunWithCoroutineScopeReceiver:
|
||||||
active: false
|
active: false
|
||||||
SuspendFunWithFlowReturnType:
|
SuspendFunWithFlowReturnType:
|
||||||
active: false
|
active: true
|
||||||
|
|
||||||
empty-blocks:
|
empty-blocks:
|
||||||
active: true
|
active: true
|
||||||
|
@ -218,7 +231,7 @@ exceptions:
|
||||||
- 'hashCode'
|
- 'hashCode'
|
||||||
- 'toString'
|
- 'toString'
|
||||||
InstanceOfCheckForException:
|
InstanceOfCheckForException:
|
||||||
active: false
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
NotImplementedDeclaration:
|
NotImplementedDeclaration:
|
||||||
active: false
|
active: false
|
||||||
|
@ -283,58 +296,46 @@ naming:
|
||||||
active: true
|
active: true
|
||||||
BooleanPropertyNaming:
|
BooleanPropertyNaming:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
allowedPattern: '^(is|has|are)'
|
allowedPattern: '^(is|has|are)'
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
ClassNaming:
|
ClassNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
classPattern: '[A-Z][a-zA-Z0-9]*'
|
classPattern: '[A-Z][a-zA-Z0-9]*'
|
||||||
ConstructorParameterNaming:
|
ConstructorParameterNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
parameterPattern: '[a-z][A-Za-z0-9]*'
|
parameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
privateParameterPattern: '[a-z][A-Za-z0-9]*'
|
privateParameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
excludeClassPattern: '$^'
|
excludeClassPattern: '$^'
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
EnumNaming:
|
EnumNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
|
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
|
||||||
ForbiddenClassName:
|
ForbiddenClassName:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
forbiddenName: []
|
forbiddenName: []
|
||||||
FunctionMaxLength:
|
FunctionMaxLength:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
maximumFunctionNameLength: 30
|
maximumFunctionNameLength: 30
|
||||||
FunctionMinLength:
|
FunctionMinLength:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
minimumFunctionNameLength: 3
|
minimumFunctionNameLength: 3
|
||||||
FunctionNaming:
|
FunctionNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
|
functionPattern: '[a-z][a-zA-Z0-9]*'
|
||||||
excludeClassPattern: '$^'
|
excludeClassPattern: '$^'
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
ignoreAnnotated:
|
|
||||||
- 'Composable'
|
|
||||||
FunctionParameterNaming:
|
FunctionParameterNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
parameterPattern: '[a-z][A-Za-z0-9]*'
|
parameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
excludeClassPattern: '$^'
|
excludeClassPattern: '$^'
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
InvalidPackageDeclaration:
|
InvalidPackageDeclaration:
|
||||||
active: false
|
active: true
|
||||||
excludes: ['**/*.kts']
|
|
||||||
rootPackage: ''
|
rootPackage: ''
|
||||||
requireRootInDeclaration: false
|
requireRootInDeclaration: false
|
||||||
LambdaParameterNaming:
|
LambdaParameterNaming:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
parameterPattern: '[a-z][A-Za-z0-9]*|_'
|
parameterPattern: '[a-z][A-Za-z0-9]*|_'
|
||||||
MatchingDeclarationName:
|
MatchingDeclarationName:
|
||||||
active: true
|
active: true
|
||||||
|
@ -343,37 +344,30 @@ naming:
|
||||||
active: true
|
active: true
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
NoNameShadowing:
|
NoNameShadowing:
|
||||||
active: false
|
active: true
|
||||||
NonBooleanPropertyPrefixedWithIs:
|
NonBooleanPropertyPrefixedWithIs:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
ObjectPropertyNaming:
|
ObjectPropertyNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
|
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
|
||||||
PackageNaming:
|
PackageNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
|
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
|
||||||
TopLevelPropertyNaming:
|
TopLevelPropertyNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
constantPattern: '[A-Z][_A-Z0-9]*'
|
constantPattern: '[A-Z][_A-Z0-9]*'
|
||||||
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
|
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
|
||||||
VariableMaxLength:
|
VariableMaxLength:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
maximumVariableNameLength: 64
|
maximumVariableNameLength: 64
|
||||||
VariableMinLength:
|
VariableMinLength:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
minimumVariableNameLength: 1
|
minimumVariableNameLength: 1
|
||||||
VariableNaming:
|
VariableNaming:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
|
||||||
variablePattern: '[a-z][A-Za-z0-9]*'
|
variablePattern: '[a-z][A-Za-z0-9]*'
|
||||||
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
|
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
|
||||||
excludeClassPattern: '$^'
|
excludeClassPattern: '$^'
|
||||||
|
@ -383,6 +377,9 @@ performance:
|
||||||
active: true
|
active: true
|
||||||
ArrayPrimitive:
|
ArrayPrimitive:
|
||||||
active: true
|
active: true
|
||||||
|
CouldBeSequence:
|
||||||
|
active: false
|
||||||
|
threshold: 3
|
||||||
ForEachOnRange:
|
ForEachOnRange:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
@ -395,7 +392,7 @@ performance:
|
||||||
potential-bugs:
|
potential-bugs:
|
||||||
active: true
|
active: true
|
||||||
AvoidReferentialEquality:
|
AvoidReferentialEquality:
|
||||||
active: false
|
active: true
|
||||||
forbiddenTypePatterns:
|
forbiddenTypePatterns:
|
||||||
- 'kotlin.String'
|
- 'kotlin.String'
|
||||||
CastToNullableType:
|
CastToNullableType:
|
||||||
|
@ -405,7 +402,7 @@ potential-bugs:
|
||||||
DontDowncastCollectionTypes:
|
DontDowncastCollectionTypes:
|
||||||
active: false
|
active: false
|
||||||
DoubleMutabilityForCollection:
|
DoubleMutabilityForCollection:
|
||||||
active: false
|
active: true
|
||||||
mutableTypes:
|
mutableTypes:
|
||||||
- 'kotlin.collections.MutableList'
|
- 'kotlin.collections.MutableList'
|
||||||
- 'kotlin.collections.MutableMap'
|
- 'kotlin.collections.MutableMap'
|
||||||
|
@ -428,9 +425,9 @@ potential-bugs:
|
||||||
ExplicitGarbageCollectionCall:
|
ExplicitGarbageCollectionCall:
|
||||||
active: true
|
active: true
|
||||||
HasPlatformType:
|
HasPlatformType:
|
||||||
active: false
|
active: true
|
||||||
IgnoredReturnValue:
|
IgnoredReturnValue:
|
||||||
active: false
|
active: true
|
||||||
restrictToAnnotatedMethods: true
|
restrictToAnnotatedMethods: true
|
||||||
returnValueAnnotations:
|
returnValueAnnotations:
|
||||||
- '*.CheckResult'
|
- '*.CheckResult'
|
||||||
|
@ -454,7 +451,7 @@ potential-bugs:
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
ignoreOnClassesPattern: ''
|
ignoreOnClassesPattern: ''
|
||||||
MapGetWithNotNullAssertionOperator:
|
MapGetWithNotNullAssertionOperator:
|
||||||
active: false
|
active: true
|
||||||
MissingPackageDeclaration:
|
MissingPackageDeclaration:
|
||||||
active: false
|
active: false
|
||||||
excludes: ['**/*.kts']
|
excludes: ['**/*.kts']
|
||||||
|
@ -474,7 +471,7 @@ potential-bugs:
|
||||||
UnnecessarySafeCall:
|
UnnecessarySafeCall:
|
||||||
active: true
|
active: true
|
||||||
UnreachableCatchBlock:
|
UnreachableCatchBlock:
|
||||||
active: false
|
active: true
|
||||||
UnreachableCode:
|
UnreachableCode:
|
||||||
active: true
|
active: true
|
||||||
UnsafeCallOnNullableType:
|
UnsafeCallOnNullableType:
|
||||||
|
@ -483,9 +480,9 @@ potential-bugs:
|
||||||
UnsafeCast:
|
UnsafeCast:
|
||||||
active: true
|
active: true
|
||||||
UnusedUnaryOperator:
|
UnusedUnaryOperator:
|
||||||
active: false
|
active: true
|
||||||
UselessPostfixExpression:
|
UselessPostfixExpression:
|
||||||
active: false
|
active: true
|
||||||
WrongEqualsTypeParameter:
|
WrongEqualsTypeParameter:
|
||||||
active: true
|
active: true
|
||||||
|
|
||||||
|
@ -493,6 +490,9 @@ style:
|
||||||
active: true
|
active: true
|
||||||
CanBeNonNullable:
|
CanBeNonNullable:
|
||||||
active: false
|
active: false
|
||||||
|
CascadingCallWrapping:
|
||||||
|
active: false
|
||||||
|
includeElvis: true
|
||||||
ClassOrdering:
|
ClassOrdering:
|
||||||
active: false
|
active: false
|
||||||
CollapsibleIfStatements:
|
CollapsibleIfStatements:
|
||||||
|
@ -503,7 +503,7 @@ style:
|
||||||
DataClassShouldBeImmutable:
|
DataClassShouldBeImmutable:
|
||||||
active: false
|
active: false
|
||||||
DestructuringDeclarationWithTooManyEntries:
|
DestructuringDeclarationWithTooManyEntries:
|
||||||
active: false
|
active: true
|
||||||
maxDestructuringEntries: 3
|
maxDestructuringEntries: 3
|
||||||
EqualsNullCall:
|
EqualsNullCall:
|
||||||
active: true
|
active: true
|
||||||
|
@ -512,7 +512,7 @@ style:
|
||||||
ExplicitCollectionElementAccessMethod:
|
ExplicitCollectionElementAccessMethod:
|
||||||
active: false
|
active: false
|
||||||
ExplicitItLambdaParameter:
|
ExplicitItLambdaParameter:
|
||||||
active: false
|
active: true
|
||||||
ExpressionBodySyntax:
|
ExpressionBodySyntax:
|
||||||
active: false
|
active: false
|
||||||
includeLineWrapping: false
|
includeLineWrapping: false
|
||||||
|
@ -539,8 +539,11 @@ style:
|
||||||
ignorePackages:
|
ignorePackages:
|
||||||
- '*.internal'
|
- '*.internal'
|
||||||
- '*.internal.*'
|
- '*.internal.*'
|
||||||
ForbiddenVoid:
|
ForbiddenSuppress:
|
||||||
active: false
|
active: false
|
||||||
|
rules: []
|
||||||
|
ForbiddenVoid:
|
||||||
|
active: true
|
||||||
ignoreOverridden: false
|
ignoreOverridden: false
|
||||||
ignoreUsageInGenerics: false
|
ignoreUsageInGenerics: false
|
||||||
FunctionOnlyReturningConstant:
|
FunctionOnlyReturningConstant:
|
||||||
|
@ -559,7 +562,7 @@ style:
|
||||||
maxJumpCount: 1
|
maxJumpCount: 1
|
||||||
MagicNumber:
|
MagicNumber:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts']
|
||||||
ignoreNumbers:
|
ignoreNumbers:
|
||||||
- '-1'
|
- '-1'
|
||||||
- '0'
|
- '0'
|
||||||
|
@ -579,6 +582,9 @@ style:
|
||||||
active: false
|
active: false
|
||||||
MandatoryBracesLoops:
|
MandatoryBracesLoops:
|
||||||
active: false
|
active: false
|
||||||
|
MaxChainedCallsOnSameLine:
|
||||||
|
active: false
|
||||||
|
maxChainedCalls: 5
|
||||||
MaxLineLength:
|
MaxLineLength:
|
||||||
active: true
|
active: true
|
||||||
maxLineLength: 120
|
maxLineLength: 120
|
||||||
|
@ -597,8 +603,10 @@ style:
|
||||||
active: false
|
active: false
|
||||||
NoTabs:
|
NoTabs:
|
||||||
active: false
|
active: false
|
||||||
ObjectLiteralToLambda:
|
NullableBooleanCheck:
|
||||||
active: false
|
active: false
|
||||||
|
ObjectLiteralToLambda:
|
||||||
|
active: true
|
||||||
OptionalAbstractKeyword:
|
OptionalAbstractKeyword:
|
||||||
active: true
|
active: true
|
||||||
OptionalUnit:
|
OptionalUnit:
|
||||||
|
@ -612,7 +620,7 @@ style:
|
||||||
RedundantExplicitType:
|
RedundantExplicitType:
|
||||||
active: false
|
active: false
|
||||||
RedundantHigherOrderMapUsage:
|
RedundantHigherOrderMapUsage:
|
||||||
active: false
|
active: true
|
||||||
RedundantVisibilityModifierRule:
|
RedundantVisibilityModifierRule:
|
||||||
active: false
|
active: false
|
||||||
ReturnCount:
|
ReturnCount:
|
||||||
|
@ -644,8 +652,10 @@ style:
|
||||||
active: false
|
active: false
|
||||||
UnnecessaryApply:
|
UnnecessaryApply:
|
||||||
active: true
|
active: true
|
||||||
UnnecessaryFilter:
|
UnnecessaryBackticks:
|
||||||
active: false
|
active: false
|
||||||
|
UnnecessaryFilter:
|
||||||
|
active: true
|
||||||
UnnecessaryInheritance:
|
UnnecessaryInheritance:
|
||||||
active: true
|
active: true
|
||||||
UnnecessaryInnerClass:
|
UnnecessaryInnerClass:
|
||||||
|
@ -664,13 +674,13 @@ style:
|
||||||
active: true
|
active: true
|
||||||
allowedNames: '(_|ignored|expected|serialVersionUID)'
|
allowedNames: '(_|ignored|expected|serialVersionUID)'
|
||||||
UseAnyOrNoneInsteadOfFind:
|
UseAnyOrNoneInsteadOfFind:
|
||||||
active: false
|
active: true
|
||||||
UseArrayLiteralsInAnnotations:
|
UseArrayLiteralsInAnnotations:
|
||||||
active: false
|
active: true
|
||||||
UseCheckNotNull:
|
UseCheckNotNull:
|
||||||
active: false
|
active: true
|
||||||
UseCheckOrError:
|
UseCheckOrError:
|
||||||
active: false
|
active: true
|
||||||
UseDataClass:
|
UseDataClass:
|
||||||
active: false
|
active: false
|
||||||
allowVars: false
|
allowVars: false
|
||||||
|
@ -681,19 +691,20 @@ style:
|
||||||
UseIfInsteadOfWhen:
|
UseIfInsteadOfWhen:
|
||||||
active: false
|
active: false
|
||||||
UseIsNullOrEmpty:
|
UseIsNullOrEmpty:
|
||||||
active: false
|
active: true
|
||||||
UseOrEmpty:
|
UseOrEmpty:
|
||||||
active: false
|
active: true
|
||||||
UseRequire:
|
UseRequire:
|
||||||
active: false
|
active: true
|
||||||
UseRequireNotNull:
|
UseRequireNotNull:
|
||||||
active: false
|
active: true
|
||||||
UselessCallOnNotNull:
|
UselessCallOnNotNull:
|
||||||
active: true
|
active: true
|
||||||
UtilityClassWithPublicConstructor:
|
UtilityClassWithPublicConstructor:
|
||||||
active: true
|
active: true
|
||||||
VarCouldBeVal:
|
VarCouldBeVal:
|
||||||
active: true
|
active: true
|
||||||
|
ignoreLateinitVar: false
|
||||||
WildcardImport:
|
WildcardImport:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
|
Loading…
Reference in New Issue