mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 00:14:35 +02:00
Add annotations in the PR for linter errors
This should help contributors notice and fix linter errors when they occur. Apparently it's as easy as printing a magic string to stdout, who knew! The lint tool doesn't give line numbers so we place the annotations at line 1 for the time being.
This commit is contained in:
parent
0df1565532
commit
15b7a780b3
8
.github/workflows/checks-pr.yml
vendored
8
.github/workflows/checks-pr.yml
vendored
@ -39,4 +39,10 @@ jobs:
|
|||||||
for file in $CHANGED; do
|
for file in $CHANGED; do
|
||||||
echo $file
|
echo $file
|
||||||
done
|
done
|
||||||
./tools/lint/lint.py $CHANGED
|
./tools/lint/lint.py $CHANGED 2> >(tee errors.out >&2)
|
||||||
|
|
||||||
|
- name: Create annotations in the PR
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
awk -F': ' <errors.out \
|
||||||
|
"{ sub(\"$(pwd)/\", \"\"); printf \"::error file=%s,line=1::%s\n\", \$1, \$2 }"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user