Skip to content

Commit 784d1e7

Browse files
authored
ci(lint): scope super-linter to changed files + repo's actual languages (#68)
* ci(lint): only validate changed files, scope linters to languages in repo Lint was running on `claude/**` push events with no DEFAULT_BRANCH and no VALIDATE_ALL_CODEBASE setting, causing super-linter to fall back to scanning the whole repo. That surfaced unrelated pre-existing failures (Python, TypeScript, HTML, Markdown linters firing on files no PR ever touched) and made the check effectively unmergeable for any branch. Changes: - Add `master` to push/PR branch filters so the default branch is actually linted (it had `total_count: 0` runs before this). - Set `DEFAULT_BRANCH: master` so super-linter can diff against the right base in push events. - Set `VALIDATE_ALL_CODEBASE: false` explicitly to enforce changed-files-only behavior. - Disable the language linters that don't apply to this repo's actual content (no Python, TypeScript, HTML, or natural-language prose to lint). Keep BASH, YAML, GitHub Actions, JSON, Checkov, Markdown, and codespell. * ci(lint): satisfy yamllint/prettier/zizmor on lint.yml itself - add `---` document start - quote `"on":` so yamllint's truthy rule stops fighting prettier - pin actions/checkout and super-linter to SHA (zizmor unpinned-uses) - add persist-credentials: false on checkout
1 parent 9143162 commit 784d1e7

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/lint.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
---
12
name: Lint
23

3-
on: # yamllint disable-line rule:truthy
4+
# yamllint disable rule:truthy
5+
"on":
46
push:
57
branches:
68
- main
9+
- master
710
- "claude/**"
811
pull_request:
912
branches:
1013
- main
14+
- master
1115

1216
permissions: {}
1317

@@ -23,12 +27,32 @@ jobs:
2327

2428
steps:
2529
- name: Checkout code
26-
uses: actions/checkout@v6
30+
# actions/checkout v4.2.2
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2732
with:
2833
fetch-depth: 0
2934
persist-credentials: false
3035

3136
- name: Super-linter
32-
uses: super-linter/super-linter@v8.6.0
37+
# super-linter v8.6.0
38+
uses: super-linter/super-linter@9e863354e3ff62e0727d37183162c4a88873df41
3339
env:
3440
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
DEFAULT_BRANCH: master
42+
VALIDATE_ALL_CODEBASE: false
43+
VALIDATE_BASH: true
44+
VALIDATE_BASH_EXEC: true
45+
VALIDATE_CHECKOV: true
46+
VALIDATE_GITHUB_ACTIONS: true
47+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: true
48+
VALIDATE_GITLEAKS: true
49+
VALIDATE_GIT_MERGE_CONFLICT_MARKERS: true
50+
VALIDATE_JSON: true
51+
VALIDATE_JSON_PRETTIER: true
52+
VALIDATE_MARKDOWN: true
53+
VALIDATE_MARKDOWN_PRETTIER: true
54+
VALIDATE_RENOVATE: true
55+
VALIDATE_SHELL_SHFMT: true
56+
VALIDATE_TRIVY: true
57+
VALIDATE_YAML: true
58+
VALIDATE_YAML_PRETTIER: true

0 commit comments

Comments
 (0)