tools: allow check-string-format to be called from anywhere
This commit is contained in:
parent
676b2b9093
commit
1222a9b4c7
@ -12,9 +12,7 @@ before_script:
|
||||
|
||||
test:
|
||||
script:
|
||||
- cd app
|
||||
- ./tools/check-string-format.py
|
||||
- cd ..
|
||||
- ./app/tools/check-string-format.py
|
||||
- ./gradlew assemble -PdisablePreDex
|
||||
# always report on lint errors to the build log
|
||||
- sed -i -e 's,textReport .*,textReport true,' app/build.gradle
|
||||
|
@ -12,9 +12,11 @@ formatRe = re.compile(r'(%%|%[^%](\$.)?)')
|
||||
|
||||
validFormatRe = re.compile(r'^(%%|%[sd]|%[0-9]\$[sd])$')
|
||||
|
||||
projectdir = os.path.join(os.path.dirname(__file__), '..')
|
||||
|
||||
count = 0
|
||||
|
||||
for d in glob.glob(os.path.join('src', 'main', 'res', 'values-*')):
|
||||
for d in sorted(glob.glob(os.path.join(projectdir, 'src', 'main', 'res', 'values-*'))):
|
||||
|
||||
str_path = os.path.join(d, 'strings.xml')
|
||||
if not os.path.exists(str_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user