Files
my-rook-config/.github/workflows/linters.yaml
T
Michael AdamandCopilot Autofix powered by AI 74c41f16cc build: introduce a linting target name taxonomy
The linting targets used to mostly have ad-hoc names usually reflecting
the linting tool used (like shellcheck, yamllint, and checkmake).

This change systematizes the names of the linting targets to follow a
pattern of lint.foo where foo usually reflects *what* is linted rather
than *how*.

so, more idiomatically, the pattern can be described as "action.thing"
to indicacte that "action" is to be performed on a "thing".

This systematization is achieved by renaming a couple of targets:

- shellcheck -> lint.shell
- yamllint -> lint.yaml
- checkmake -> lint.make
0 helm.lint -> lint.helm
- pylint -> lint.python
fmt  -> lint.fmt

Additionally, a new target go.lint is introduced that runs
several go linting tools.

Finally, two fixing targets are renamed for consistency:

* fmt-fix -> fix.fmt
* markdownlint.fix -> fix/markdown

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-29 17:27:18 +02:00

57 lines
1.3 KiB
YAML

name: Linters
on:
push:
tags:
- v*
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*
# cancel the in-progress workflow when PR is refreshed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
yaml-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Lint YAML files
run: make lint.yaml
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.12
- name: Install pylint and requirements
run: |
pip install pylint
pip install pylint --upgrade
pip install requests
pip install pygit2
- name: Lint Python scripts
run: make lint.python
- name: Setup black for py
uses: psf/black@c6755bb741b6481d6b3d3bb563c83fa060db96c9 # stable