yamllint
This adds yamllint
checks for helping users understand issues with their metadata files. (as suggested in #745 (closed))
- yamllint is added as an optional dependency. So if it's not installed checks will be skipped (silently)
- checks are only taking place in 4 cases:
- when pyyaml fails to parse any
.yml
srclibs or app-metadata file - when
fdroid lint
is gets called app-metadata files and all their references srclib files
(running yamllint for all.yml
srclib and app-metadata files increases execution-time by an order of magnitude. On my test environment from 8.77s to 104.99s. So when runningfdroid lint
without a specific list of appids yamllint is off by default. I've added an option to run it regardless:--force-yamllint
)
- when pyyaml fails to parse any
Here's an example of how yamllint output will look like:
$ fdroid lint --force-yamllint
metadata/io.anuke.mindustry.yml:187: trailing spaces (trailing-spaces)
metadata/io.anuke.mindustry.yml:189: trailing spaces (trailing-spaces)
metadata/net.olejon.mdapp.yml:155: trailing spaces (trailing-spaces)
Edited by Michael Pöhn