Added RuleSetProvider file to define our custom rules

This commit is contained in:
MohitMali 2023-07-05 19:34:59 +05:30 committed by Kelson
parent 8e6c74abe8
commit ae5b3a5074
3 changed files with 25 additions and 6 deletions

View File

@ -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

View File

@ -0,0 +1,19 @@
#
# Kiwix Android
# Copyright (c) 2023 Kiwix <android.kiwix.org>
# 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 <http://www.gnu.org/licenses/>.
#
#
plugin.CustomRulesProvider

View File

@ -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"