Skip to content

Commit a632441

Browse files
aquarionclaude
andcommitted
⚙️ Add actionlint as pre-commit hook and CI workflow
Suppresses false positive on fromJson() matrix php-version property. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a6c65e5 commit a632441

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/lint-actions.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "[Lint] GitHub Actions"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- ".github/workflows/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- ".github/workflows/**"
12+
13+
jobs:
14+
actionlint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
- name: Lint GitHub Actions workflows
19+
uses: rhysd/actionlint@v1.7.12
20+
with:
21+
# fromJson() matrix values have no statically-known type; suppress false positive
22+
args: -ignore 'property .php-version. is not defined in object type'

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- repo: https://github.com/rhysd/actionlint
10+
rev: v1.7.11
11+
hooks:
12+
- id: actionlint
13+
# fromJson() matrix values have no statically-known type; suppress false positive
14+
args: ["-ignore", "property .php-version. is not defined in object type"]

0 commit comments

Comments
 (0)