diff options
| author | 2018-11-26 17:49:46 +0000 | |
|---|---|---|
| committer | 2018-11-26 17:49:46 +0000 | |
| commit | 559530df33bb66d3e01d11d751963dd98e09722f (patch) | |
| tree | 45a0261ec42793f7ccd60476bbe77c4eb8f83a30 | |
| parent | 93a1b159bc7cdc0491f8a5c2c30155fb30adff0f (diff) | |
| parent | 2f5dd12af0c78ba077a9dc2b9cf77b772b618cd1 (diff) | |
Merge "Add linter for strings attribute names"
| -rw-r--r-- | tools/stringslint/stringslint.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/stringslint/stringslint.py b/tools/stringslint/stringslint.py index 03c0b9af66a0..afe91cda37b0 100644 --- a/tools/stringslint/stringslint.py +++ b/tools/stringslint/stringslint.py @@ -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", |