Skip to content

ci: add linting to ci #9

ci: add linting to ci

ci: add linting to ci #9

Workflow file for this run

---
name: "lint"
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
concurrency:
group: lint-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
markdown-lint:
name: markdown-lint
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ".github/workflows/lint.yaml"
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli@0.35.0
- name: Run markdown-lint
run: markdownlint -c .github/linters/.markdown-lint.yaml *.md **/*.md
shellcheck:
name: shellcheck
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v4
- name: Run shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
shfmt:
name: shfmt
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v4
- name: Run shfmt
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2 # v0.9.0
env:
SHFMT_OPTS: -l -bn -ci -i 2 -d
with:
sh_checker_shellcheck_disable: true
yamllint:
name: yamllint
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v4
- name: Run yamllint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
with:
config_file: ".github/linters/.yamllint.yaml"