Kirill Zhukov
03/22/2023, 10:34 PM> Task ...ui:detektDebug FAILED
.../label/Label.kt:162:19: Top level constant names should match the pattern: [A-Z][_A-Z0-9]* [TopLevelPropertyNaming]
.../label/Label.kt - 5min debt
TopLevelPropertyNaming - [Top level constant names should match the pattern: [A-Z][_A-Z0-9]*] at .../label/Label.kt:162:19
Overall debt: 5min
naming - 5min debt
TopLevelPropertyNaming - [Top level constant names should match the pattern: [A-Z][_A-Z0-9]*] at .../label/Label.kt:162:19
Overall debt: 5min
gammax
03/23/2023, 2:45 PMschalkms
03/23/2023, 5:03 PMKirill Zhukov
03/23/2023, 7:16 PMKirill Zhukov
03/23/2023, 7:16 PMKirill Zhukov
03/23/2023, 7:17 PMKirill Zhukov
03/23/2023, 7:19 PM// Common plugin configuration
detekt {
autoCorrect = false
parallel = true
config = files(rootProject.file("detekt/config.yml"))
buildUponDefaultConfig = true
}
Kirill Zhukov
03/23/2023, 7:19 PM// Configure Detekt Gradle task
tasks.withType<Detekt>().configureEach {
// Configure sources
setSource(detektSources)
include(detektIncludes)
exclude(detektExcludes)
// TODO: generate serif report and add to GHA
// Configure reports
reports {
html.required.set(false)
sarif.required.set(false)
xml.required.set(false)
txt.required.set(false)
md.required.set(false)
}
Kirill Zhukov
03/23/2023, 7:20 PMdetektSources
, detektIncludes
, detektExcludes
are just filters for directories and file types that I want detekt to run onKirill Zhukov
03/23/2023, 7:20 PM// Sources to analyze
val detektSources = listOf(
DEFAULT_SRC_DIR_JAVA,
DEFAULT_SRC_DIR_KOTLIN,
// Kotlin Multiplatform
"src/commonMain/kotlin",
"src/androidMain/kotlin",
"src/iosMain/kotlin",
"src/commonJvmMain/kotlin",
"src/jvmMain/kotlin"
)
// Analyze Kotlin files only
val detektIncludes = listOf(
"**/*.kt",
"**/*.kts"
)
val detektExcludes = listOf(
"**/resources/**",
"**/generated/**",
"**/_build/**"
Kirill Zhukov
03/23/2023, 7:21 PMpluginManager.apply<DetektPlugin>()
Kirill Zhukov
03/23/2023, 7:21 PMconfig:
validation: true
checkExhaustiveness: true
warningsAsErrors: true
build:
maxIssues: 0
excludeCorrectable: false
console-reports:
active: true
exclude:
- 'ProjectStatisticsReport'
- 'ComplexityReport'
- 'NotificationReport'
processors:
active: true
exclude:
- 'DetektProgressListener'
- 'KtFileCountProcessor'
- 'PackageCountProcessor'
- 'ClassCountProcessor'
- 'FunctionCountProcessor'
- 'PropertyCountProcessor'
- 'ProjectComplexityProcessor'
- 'ProjectCognitiveComplexityProcessor'
- 'ProjectLLOCProcessor'
- 'ProjectCLOCProcessor'
- 'ProjectLOCProcessor'
- 'ProjectSLOCProcessor'
- 'LicenseHeaderLoaderExtension'
Kirill Zhukov
03/23/2023, 7:22 PMgradle detekt detektDebug detektAndroidDebug --continue
Kirill Zhukov
03/23/2023, 7:22 PMdetekt
task is doing, it doesn’t seem to validate anything?schalkms
03/25/2023, 9:08 PMschalkms
03/25/2023, 9:09 PM