diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c3174062..23e1f7776 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/app/tools/check-string-format.py b/app/tools/check-string-format.py index 625fcfb82..dcb4cadef 100755 --- a/app/tools/check-string-format.py +++ b/app/tools/check-string-format.py @@ -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):