Skip to content

Commit

Permalink
Suppress deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyVPinchuk committed Sep 20, 2022
1 parent ce3a934 commit 2344934
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Expand Up @@ -20,7 +20,7 @@ class PotentialBugProvider : DefaultRuleSetProvider {
Deprecation(config),
DontDowncastCollectionTypes(config),
DoubleMutabilityForCollection(config),
DuplicateCaseInWhenExpression(config),
@Suppress("DEPRECATION") DuplicateCaseInWhenExpression(config),
@Suppress("DEPRECATION") ElseCaseInsteadOfExhaustiveWhen(config),
EqualsAlwaysReturnsTrueOrFalse(config),
EqualsWithHashCodeExist(config),
Expand Down
Expand Up @@ -6,7 +6,7 @@ import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

class DuplicateCaseInWhenExpressionSpec {
private val subject = DuplicateCaseInWhenExpression(Config.empty)
private val subject = @Suppress("DEPRECATION") DuplicateCaseInWhenExpression(Config.empty)

@Test
fun `reports duplicated label in when`() {
Expand Down
Expand Up @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test

@KotlinCoreEnvironmentTest
class ElseCaseInsteadOfExhaustiveWhenSpec(private val env: KotlinCoreEnvironment) {
private val subject = ElseCaseInsteadOfExhaustiveWhen()
private val subject = @Suppress("DEPRECATION") ElseCaseInsteadOfExhaustiveWhen()

@Nested
inner class Enum {
Expand Down
Expand Up @@ -14,7 +14,7 @@ class MissingWhenCaseSpec(private val env: KotlinCoreEnvironment) {

@Nested
inner class `MissingWhenCase rule` {
private val subject = MissingWhenCase()
private val subject = @Suppress("DEPRECATION") MissingWhenCase()

@Nested
inner class `enum` {
Expand Down Expand Up @@ -309,7 +309,7 @@ class MissingWhenCaseSpec(private val env: KotlinCoreEnvironment) {

@Nested
inner class `MissingWhenCase rule when else expression is not considered` {
private val subject = MissingWhenCase(
private val subject = @Suppress("DEPRECATION") MissingWhenCase(
TestConfig(mapOf("allowElseExpression" to false))
)

Expand Down
Expand Up @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test

@KotlinCoreEnvironmentTest
class RedundantElseInWhenSpec(private val env: KotlinCoreEnvironment) {
private val subject = RedundantElseInWhen()
private val subject = @Suppress("DEPRECATION") RedundantElseInWhen()

@Nested
inner class `enum` {
Expand Down

0 comments on commit 2344934

Please sign in to comment.