From 396f02c1aba07d0d9dccd0c0d7488923f3c56fc7 Mon Sep 17 00:00:00 2001 From: Alistair Sykes Date: Tue, 5 Nov 2019 14:35:13 +0000 Subject: [PATCH] master: Adjusted the IdNaming rule to include specifics for CheckBox and Switch --- .../uk/co/brightec/xmlcheck/rules/attr/android/IdNaming.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/uk/co/brightec/xmlcheck/rules/attr/android/IdNaming.kt b/src/main/kotlin/uk/co/brightec/xmlcheck/rules/attr/android/IdNaming.kt index 81573db..3e8e12f 100644 --- a/src/main/kotlin/uk/co/brightec/xmlcheck/rules/attr/android/IdNaming.kt +++ b/src/main/kotlin/uk/co/brightec/xmlcheck/rules/attr/android/IdNaming.kt @@ -55,6 +55,12 @@ class IdNaming : AttrRule( if (words.contains("Button")) { return attrId == "button" || attrId.startsWith("button_") } + if (words.contains("CheckBox")) { + return attrId == "check_box" || attrId.startsWith("check_box_") + } + if (words.contains("Switch")) { + return attrId == "switch" || attrId.startsWith("switch_") + } if (words.contains("Card")) { return attrId == "card" || attrId.startsWith("card_") }