Skip to content

Commit 1e7bc2b

Browse files
committed
Update doc for linter debug locally
1 parent 266c2e7 commit 1e7bc2b

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/check.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ jobs:
8787
needs: ['build']
8888
container: ghcr.io/datadog/images-rb/engines/ruby:3.3
8989
steps:
90-
- name: Checkout
91-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9291
with:
9392
persist-credentials: false
9493
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 # requires the lockfile
@@ -134,11 +133,8 @@ jobs:
134133
zizmor:
135134
name: zizmor
136135
runs-on: ubuntu-24.04
137-
permissions:
138-
security-events: write
139136
steps:
140-
- name: Checkout repository
141-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
137+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
142138
with:
143139
persist-credentials: false
144140
- name: Run zizmor 🌈
@@ -155,7 +151,8 @@ jobs:
155151
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
156152
with:
157153
persist-credentials: false
158-
- uses: docker://rhysd/actionlint:1.7.7
154+
- name: Run actionlint
155+
uses: docker://rhysd/actionlint:1.7.7
159156
with:
160157
args: -color
161158

@@ -167,7 +164,8 @@ jobs:
167164
with:
168165
persist-credentials: false
169166
- run: pip install yamllint
170-
- run: yamllint --strict .
167+
- name: Run yamllint
168+
run: yamllint --strict .
171169

172170
complete:
173171
name: Static Analysis (complete)

docs/DevelopmentGuide.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,23 @@ To change your code to the version that standard wants, run:
306306
$ bundle exec rake standard:fix
307307
```
308308

309+
For non-Ruby code, follow the instructions below to debug locally, if CI failed with respective linter.
310+
311+
- For `yamllint`, run:
312+
```bash
313+
docker run --rm -v $(pwd):/app -w /app cytopia/yamllint .
314+
```
315+
316+
- For `actionlint`, run:
317+
```bash
318+
docker run --rm -v $(pwd):/app -w /app rhysd/actionlint -color
319+
```
320+
321+
- For `zizmor`, run:
322+
```bash
323+
docker run --rm -v $(pwd):/app -w /app -e GH_TOKEN=$(gh auth token) ghcr.io/woodruffw/zizmor --min-severity low .
324+
```
325+
309326
## Appendix
310327

311328
### Writing new integrations

0 commit comments

Comments
 (0)