Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 559530df authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Add linter for strings attribute names"

parents 93a1b159 2f5dd12a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -145,6 +145,13 @@ def lint(path):
            if "translatable" in child.attrib and child.attrib["translatable"].lower() == "false":
                continue

            misspelled_attributes = [
              ("translateable", "translatable"),
            ]
            for misspelling, expected in misspelled_attributes:
                if misspelling in child.attrib:
                    error(child, "Misspelled <string> attribute.", misspelling, expected)

            limit = re.search("CHAR[ _-]LIMIT=(\d+|NONE|none)", comment.text)
            if limit is None:
                info(child, "Missing CHAR LIMIT to aid translation",