From 1c2ec0150a8c0ed3d6c395c66c7b2e9a060bcea5 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:26:12 +1000 Subject: [PATCH] Remove HEADER_KEYWORD & IMPL_KEYWORD (#2810) Remove calls to `KtTokens.HEADER_KEYWORD` & `KtTokens.IMPL_KEYWORD`. These have been removed from Kotlin effective Kotlin 2.1.0-Beta1. --- ktlint-rule-engine-core/api/ktlint-rule-engine-core.api | 2 -- .../com/pinterest/ktlint/rule/engine/core/api/ElementType.kt | 2 -- .../ktlint/ruleset/standard/rules/ModifierOrderRule.kt | 1 - 3 files changed, 5 deletions(-) diff --git a/ktlint-rule-engine-core/api/ktlint-rule-engine-core.api b/ktlint-rule-engine-core/api/ktlint-rule-engine-core.api index 47b48e6457..27485a3075 100644 --- a/ktlint-rule-engine-core/api/ktlint-rule-engine-core.api +++ b/ktlint-rule-engine-core/api/ktlint-rule-engine-core.api @@ -187,11 +187,9 @@ public final class com/pinterest/ktlint/rule/engine/core/api/ElementType { public final fun getGT ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getGTEQ ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getHASH ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; - public final fun getHEADER_KEYWORD ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIDENTIFIER ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIF ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIF_KEYWORD ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; - public final fun getIMPL_KEYWORD ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIMPORT_ALIAS ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIMPORT_DIRECTIVE ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; public final fun getIMPORT_KEYWORD ()Lorg/jetbrains/kotlin/com/intellij/psi/tree/IElementType; diff --git a/ktlint-rule-engine-core/src/main/kotlin/com/pinterest/ktlint/rule/engine/core/api/ElementType.kt b/ktlint-rule-engine-core/src/main/kotlin/com/pinterest/ktlint/rule/engine/core/api/ElementType.kt index ee3d0ce7a6..d02b67da9a 100644 --- a/ktlint-rule-engine-core/src/main/kotlin/com/pinterest/ktlint/rule/engine/core/api/ElementType.kt +++ b/ktlint-rule-engine-core/src/main/kotlin/com/pinterest/ktlint/rule/engine/core/api/ElementType.kt @@ -271,8 +271,6 @@ public object ElementType { public val INFIX_KEYWORD: IElementType = KtTokens.INFIX_KEYWORD public val CONST_KEYWORD: IElementType = KtTokens.CONST_KEYWORD public val SUSPEND_KEYWORD: IElementType = KtTokens.SUSPEND_KEYWORD - public val HEADER_KEYWORD: IElementType = KtTokens.HEADER_KEYWORD - public val IMPL_KEYWORD: IElementType = KtTokens.IMPL_KEYWORD public val EXPECT_KEYWORD: IElementType = KtTokens.EXPECT_KEYWORD public val ACTUAL_KEYWORD: IElementType = KtTokens.ACTUAL_KEYWORD diff --git a/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ModifierOrderRule.kt b/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ModifierOrderRule.kt index fdb2907e54..021243e44b 100644 --- a/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ModifierOrderRule.kt +++ b/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/ModifierOrderRule.kt @@ -108,7 +108,6 @@ public class ModifierOrderRule : StandardRule("modifier-order") { OPERATOR_KEYWORD, DATA_KEYWORD, // NOINLINE_KEYWORD, CROSSINLINE_KEYWORD, OUT_KEYWORD, IN_KEYWORD, REIFIED_KEYWORD - // HEADER_KEYWORD, IMPL_KEYWORD ) private val tokenSet = TokenSet.create(*ORDERED_MODIFIERS) }