Skip to content

Commit

Permalink
Suppress deprecation warnings in PotentialBugProvider.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyVPinchuk committed Sep 20, 2022
1 parent 897eee5 commit cc947c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions detekt-core/src/main/resources/deprecation.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
complexity>LongParameterList>threshold=Use `functionThreshold` and `constructorThreshold` instead
empty-blocks>EmptyFunctionBlock>ignoreOverriddenFunctions=Use `ignoreOverridden` instead
potential-bugs>DuplicateCaseInWhenExpression=Rule deprecated as compiler performs this check by default
potential-bugs>ElseCaseInsteadOfExhaustiveWhen=Rule deprecated as compiler performs this check by default
potential-bugs>IgnoredReturnValue>restrictToAnnotatedMethods=Use `restrictToConfig` instead
potential-bugs>LateinitUsage>excludeAnnotatedProperties=Use `ignoreAnnotated` instead
potential-bugs>MissingWhenCase=Rule deprecated as compiler performs this check by default
potential-bugs>RedundantElseInWhen=Rule deprecated as compiler performs this check by default
naming>FunctionParameterNaming>ignoreOverriddenFunctions=Use `ignoreOverridden` instead
naming>MemberNameEqualsClassName>ignoreOverriddenFunction=Use `ignoreOverridden` instead
style>FunctionOnlyReturningConstant>excludeAnnotatedFunction=Use `ignoreAnnotated` instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ class PotentialBugProvider : DefaultRuleSetProvider {

override val ruleSetId: String = "potential-bugs"

@Suppress("DEPRECATION")
override fun instance(config: Config): RuleSet = RuleSet(
ruleSetId,
listOf(
AvoidReferentialEquality(config),
Deprecation(config),
DontDowncastCollectionTypes(config),
DoubleMutabilityForCollection(config),
DuplicateCaseInWhenExpression(config),
ElseCaseInsteadOfExhaustiveWhen(config),
@Suppress("DEPRECATION") DuplicateCaseInWhenExpression(config),
@Suppress("DEPRECATION") ElseCaseInsteadOfExhaustiveWhen(config),
EqualsAlwaysReturnsTrueOrFalse(config),
EqualsWithHashCodeExist(config),
ExitOutsideMain(config),
Expand All @@ -35,9 +34,9 @@ class PotentialBugProvider : DefaultRuleSetProvider {
LateinitUsage(config),
MapGetWithNotNullAssertionOperator(config),
MissingPackageDeclaration(config),
MissingWhenCase(config),
@Suppress("DEPRECATION") MissingWhenCase(config),
NullCheckOnMutableProperty(config),
RedundantElseInWhen(config),
@Suppress("DEPRECATION") RedundantElseInWhen(config),
UnconditionalJumpStatementInLoop(config),
UnnecessaryNotNullOperator(config),
UnnecessarySafeCall(config),
Expand Down

0 comments on commit cc947c5

Please sign in to comment.