Skip to content

Initial framework

Kevin Daudt requested to merge implement into master

This adds the basic framework to build linters on.

mvdan.cc/sh/v2/syntax is used to parse shell files and provide an AST of the APKBUILD. Then we have our own parser, which pre-processes the AST to give higher-level constructs (currently only global variables) that can be used in linters.

The linter provides a global linters slice where each linter module can add individual checks to. A LintingViolation struct contains the details of individual linting rules, which can be instantiated to add details for specific violations.

Merge request reports

Loading