diff --git a/buildSrc/src/main/kotlin/plugin/DeprecationExclusionRules.kt b/buildSrc/src/main/kotlin/plugin/DeprecationExclusionRules.kt index da12cbbe2..5009cd161 100644 --- a/buildSrc/src/main/kotlin/plugin/DeprecationExclusionRules.kt +++ b/buildSrc/src/main/kotlin/plugin/DeprecationExclusionRules.kt @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.psi.KtImportDirective class DeprecationExclusionRule : Rule() { override val issue = Issue( - id = "DeprecationExclusion", + id = javaClass.simpleName, severity = Severity.CodeSmell, description = "Deprecated imports should be excluded", debt = Debt.FIVE_MINS diff --git a/buildSrc/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider b/buildSrc/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider new file mode 100644 index 000000000..9c9c11ad7 --- /dev/null +++ b/buildSrc/src/main/resources/META-INF/services/io.gitlab.arturbosch.detekt.api.RuleSetProvider @@ -0,0 +1,19 @@ +# +# Kiwix Android +# Copyright (c) 2023 Kiwix +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# + +plugin.CustomRulesProvider diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index be95c17da..120dd3d54 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -12,6 +12,11 @@ config: # when writing own rules with new properties, exclude the property path e.g.: "my_rule_set,.*>.*>[my_property]" excludes: "" +CustomRulesProvider: + active: true + DeprecationExclusionRule: + active: true + processors: active: true exclude: @@ -31,11 +36,6 @@ console-reports: # - 'FindingsReport' - 'FileBasedFindingsReport' -deprecation-rules: - active: true - DeprecationExclusion: - active: true - comments: active: true excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"