diff --git a/ktlint-rule-engine/src/main/kotlin/com/pinterest/ktlint/rule/engine/internal/SuppressionLocator.kt b/ktlint-rule-engine/src/main/kotlin/com/pinterest/ktlint/rule/engine/internal/SuppressionLocator.kt index 5fa7a31ba8..85c5e66231 100644 --- a/ktlint-rule-engine/src/main/kotlin/com/pinterest/ktlint/rule/engine/internal/SuppressionLocator.kt +++ b/ktlint-rule-engine/src/main/kotlin/com/pinterest/ktlint/rule/engine/internal/SuppressionLocator.kt @@ -264,7 +264,7 @@ internal class SuppressionLocator( "PackageName" to listOf("standard:package-name"), "PropertyName" to listOf("standard:property-naming", "standard:backing-property-naming"), "ConstPropertyName" to listOf("standard:property-naming"), - "ObjectPropertyName" to listOf("standard:property-naming"), + "ObjectPropertyName" to listOf("standard:property-naming", "standard:backing-property-naming"), "PrivatePropertyName" to listOf("standard:property-naming"), "UnusedImport" to listOf("standard:no-unused-imports"), ) diff --git a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/BackingPropertyNamingRuleTest.kt b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/BackingPropertyNamingRuleTest.kt index de5207895d..40cca61c9d 100644 --- a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/BackingPropertyNamingRuleTest.kt +++ b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/BackingPropertyNamingRuleTest.kt @@ -277,6 +277,7 @@ class BackingPropertyNamingRuleTest { strings = [ "ktlint:standard:backing-property-naming", "PropertyName", // IntelliJ IDEA suppression + "ObjectPropertyName", // IntelliJ IDEA suppression ], ) fun `Given a property with a disallowed name which is suppressed`(suppressionName: String) {