pmb.helpers.lint: add simple linting (!1855)

Run linting, just like in pmaports.git CI checks. Start with
apkbuild-lint, eventually this should run all checks.

Related: #1869
This commit is contained in:
Danct12 2020-02-06 13:03:02 +01:00 committed by Oliver Smith
parent 2f01c91c1a
commit a021d1924c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 56 additions and 0 deletions

View file

@ -270,6 +270,14 @@ def arguments_repo_missing(subparser):
return ret
def arguments_lint(subparser):
lint = subparser.add_parser("lint", help="run quality checks on pmaports"
" (required to pass CI)")
argument_packages = lint.add_argument("packages", nargs="*")
if argcomplete:
argument_packages.completer = package_completer
def package_completer(prefix, action, parser, parsed_args):
args = parsed_args
pmb.config.merge_with_args(args)
@ -375,6 +383,7 @@ def arguments():
arguments_qemu(sub)
arguments_pkgrel_bump(sub)
arguments_newapkbuild(sub)
arguments_lint(sub)
# Action: log
log = sub.add_parser("log", help="follow the pmbootstrap logfile")