From 15b7a780b3e66ef1af36d369a101568883b75643 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Mon, 4 Nov 2024 17:23:23 -0800 Subject: [PATCH] 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. --- .github/workflows/checks-pr.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks-pr.yml b/.github/workflows/checks-pr.yml index ee6d2b5464..86a5900a95 100644 --- a/.github/workflows/checks-pr.yml +++ b/.github/workflows/checks-pr.yml @@ -39,4 +39,10 @@ jobs: for file in $CHANGED; do echo $file 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': '