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

@ -35,6 +35,7 @@ import pmb.chroot.other
import pmb.export
import pmb.flasher
import pmb.helpers.git
import pmb.helpers.lint
import pmb.helpers.logging
import pmb.helpers.pkgrel_bump
import pmb.helpers.pmaports
@ -416,3 +417,12 @@ def pull(args):
logging.info("* " + pmb.helpers.git.get_path(args, name_repo))
logging.info("---")
return False
def lint(args):
packages = args.packages
if not packages:
packages = pmb.helpers.pmaports.get_list(args)
for package in packages:
pmb.helpers.lint.check(args, package)