mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
lint: support new per-package subdirs for l18n and dev signatures
Graphics and localized text can now be stored in the package folders, always in a folder that is named for the locale. The upstream developer signature is also now stored, so that the upstream APK can be reproduced even if they remove their APKs. #291 fdroiddata!2229 fdroiddata!2224 fdroidclient#15 fdroidserver#174
This commit is contained in:
parent
3dbd74262f
commit
1178d032f3
1 changed files with 6 additions and 2 deletions
|
|
@ -121,6 +121,8 @@ regex_checks = {
|
|||
],
|
||||
}
|
||||
|
||||
locale_pattern = re.compile(r'^[a-z]{2,3}(-[A-Z][A-Z])?$')
|
||||
|
||||
|
||||
def check_regexes(app):
|
||||
for f, checks in regex_checks.items():
|
||||
|
|
@ -325,12 +327,12 @@ def check_files_dir(app):
|
|||
files = set()
|
||||
for name in os.listdir(dir_path):
|
||||
path = os.path.join(dir_path, name)
|
||||
if not os.path.isfile(path):
|
||||
if not (os.path.isfile(path) or name == 'signatures' or locale_pattern.match(name)):
|
||||
yield "Found non-file at %s" % path
|
||||
continue
|
||||
files.add(name)
|
||||
|
||||
used = set()
|
||||
used = {'signatures', }
|
||||
for build in app.builds:
|
||||
for fname in build.patch:
|
||||
if fname not in files:
|
||||
|
|
@ -339,6 +341,8 @@ def check_files_dir(app):
|
|||
used.add(fname)
|
||||
|
||||
for name in files.difference(used):
|
||||
if locale_pattern.match(name):
|
||||
continue
|
||||
yield "Unused file at %s" % os.path.join(dir_path, name)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue