name: Lint # Static analysis over shell scripts (ShellCheck) and the .plg/XML manifest # (xmllint) on every push and pull request. Mirrors scripts/dev/lint.sh for # local use. on: push: branches: [main] pull_request: jobs: shellcheck: name: ShellCheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install ShellCheck run: | sudo apt-get update -qq sudo apt-get install -y --no-install-recommends shellcheck - name: Run ShellCheck run: | set -eu # shellcheck disable=SC2038 (find | xargs is fine here, filenames # in this repo never contain spaces/newlines) find plugin/rc.d plugin/sbin scripts -type f \ \( -name '*.sh' -o -name 'rc.*' -o -name '*.SlackBuild' \) \ -print0 \ | xargs -0 shellcheck --severity=warning --external-sources xmllint: name: Validate .plg XML runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install libxml2-utils run: | sudo apt-get update -qq sudo apt-get install -y --no-install-recommends libxml2-utils - name: Validate podman.plg is well-formed XML run: xmllint --noout plugin/podman.plg editorconfig: name: EditorConfig runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: editorconfig-checker/action-editorconfig-checker@main