Skip to content

Commit c096104

Browse files
committed
Annotate codespell diagnostics from workflow
1 parent 2f8135d commit c096104

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
uses: pre-commit/action@v3.0.1
4949

5050
- name: Push auto-fixes
51+
id: push-fixes
5152
if: ${{ !cancelled() && steps.pre-commit.outcome == 'failure' }}
5253
run: |
5354
if git diff --quiet; then
@@ -59,3 +60,9 @@ jobs:
5960
git commit -m "Apply pre-commit auto-fixes"
6061
git push
6162
fi
63+
64+
- name: Annotate codespell errors
65+
if: ${{ !cancelled() && steps.push-fixes.outcome == 'failure' }}
66+
run: |
67+
pre-commit run --all-files codespell 2>&1 |
68+
sed -n 's/^\([^:]*\):\([0-9]*\): \(.*\)$/::error file=\1,line=\2::\3/p'

0 commit comments

Comments
 (0)