Make "pmbootstrap lint" execute all CI checks from pmaports.git
Let's have pmbootstrap lint
as one command that executes all static checks that would be running in pmaports.git's gitlab-ci config.
It would look like this for all checks:
$ pmbootstrap lint hello-world
[12:57:34] (native) linting hello-world with apkbuild-lint
MC:[AL5]:APKBUILD:8:variable set to empty string: depends=""
MC:[AL5]:APKBUILD:9:variable set to empty string: makedepends=""
MC:[AL5]:APKBUILD:10:variable set to empty string: subpackages=""
MC:[AL5]:APKBUILD:12:variable set to empty string: options=""
[12:57:34] (native) linting hello-world with apkbuild-shellcheck
[12:57:34] (native) linting hello-world with kconfig check
... (more checks here!)
[12:57:34] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[12:57:34] Done
To run a single check:
$ pmbootstrap lint --apkbuild hello-world
[12:57:34] (native) linting hello-world with apkbuild-lint
MC:[AL5]:APKBUILD:8:variable set to empty string: depends=""
MC:[AL5]:APKBUILD:9:variable set to empty string: makedepends=""
MC:[AL5]:APKBUILD:10:variable set to empty string: subpackages=""
MC:[AL5]:APKBUILD:12:variable set to empty string: options=""
[12:57:34] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[12:57:34] Done
TODO (put each item in its own merge request!):
-
initial implementation of pmbootstrap lint
with justapkbuild-lint
(!1855 (merged)) -
add kconfig check and add parameters to choose which check to run ( --apkbuild
,--kconfig
) -
run pmbootstrap lint
by default on all aports (must ignore "temp" for apkbuild-lint etc, make sure that the output is sane) -
(like in gitlab-ci.yml) add devices in wiki check, with own parameter to run just this check (same for all below) -
(like in gitlab-ci.yml) add flake8 on pmaports check -
(like in gitlab-ci.yml) add shellcheck on pmaports check -
(like in gitlab-ci.yml) run checks from aports-static ( check_changed_aports_versions.py
etc.) -
exit with 1 if one or more linters failed (but do not exit after the first failure) -
replace the now-duplicate code in pmaports.git with running "pmbootstrap lint" where possible, so we only have one implementation and the "pmbootstrap lint" check really does the same as the CI check.
Related: pmaports#428
Edited by Daniele Debernardi