5 Commits

Author SHA1 Message Date
Hai Shalom
c960c92f9c Shift stringslint to using python3.
Bug: 169704254
Test: manual
Change-Id: I175bdf75e7424bef6d4ac9f51797510766de2b14
(cherry picked from commit 85ccd0418097d774d8db8af77da2d6b5ed75d743)
Merged-In: I354ef4b12c75505a069fdf657ab98a9b122785c7
2021-01-22 22:07:30 +00:00
Anton Hansson
2f5dd12af0 Add linter for strings attribute names
Only one bad example for now, which is a misspelling that's not
entirely uncommon and can lead to real problems (see linked bug).

Example output:
Line 58: 'my_new': Misspelled <string> attribute.
        Actual: translateable
        Example: translatable

Bug: 119884572
Test: with a misspelled attribute
Change-Id: If61412fe318a34191920781c4834584363080e11
2018-11-23 15:25:52 +00:00
Jeff Sharkey
47c792435e More string lint checks.
Expand strings into samples that are representative of what'll be
shown in UI, and warn if they're longer than defined CHAR LIMIT.

Guide all-caps strings towards android:textAllCaps if actions.

Warn when strings mention "phone" without defining product-specific
variants.

Bug: 76097999
Test: manual
Change-Id: I08046ecf531b2d616cb357639e804b73d6a12bea
2018-06-06 09:51:01 -06:00
Jeff Sharkey
c65461e584 Detect paths without lunch.
Test: manual
Bug: 76097999
Change-Id: I47b97719f6aa957b0a216e6e1930ae2fe2f0108b
2018-03-27 16:26:19 -06:00
Jeff Sharkey
abe058c0f0 Add linter for strings.xml.
Strings are tedious to get right, so write a lint script that catches
common errors to warn developers before they're uploaded.

Test: builds, boots
Bug: 76097999
Change-Id: I9826ca796c17cd93a100951d56214653de63a379
2018-03-26 11:04:48 -06:00