File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,12 +62,22 @@ jobs:
6262
6363 - name : Check Linter Statuses
6464 if : always() # This ensures the step runs even if previous steps failed
65+ env :
66+ RUFF_LINT : ${{ steps.ruff-lint.outcome }}
67+ RUFF_FORMAT : ${{ steps.ruff-format.outcome }}
68+ MYPY : ${{ steps.mypy.outcome }}
69+ PYRIGHT : ${{ steps.pyright.outcome }}
70+ JSCPD : ${{ steps.jscpd.outcome }}
6571 run : |
66- if [[ "${{ steps.ruff-lint.outcome }}" == "failure" || \
67- "${{ steps.ruff-format.outcome }}" == "failure" || \
68- "${{ steps.mypy.outcome }}" == "failure" || \
69- "${{ steps.pyright.outcome }}" == "failure" || \
70- "${{ steps.jscpd.outcome }}" == "failure" ]]; then
71- echo "One or more linting/checking steps failed."
72+ failed=()
73+ [[ "$RUFF_LINT" == "failure" ]] && failed+=("Ruff Linter")
74+ [[ "$RUFF_FORMAT" == "failure" ]] && failed+=("Ruff Formatter")
75+ [[ "$MYPY" == "failure" ]] && failed+=("MyPy")
76+ [[ "$PYRIGHT" == "failure" ]] && failed+=("Pyright")
77+ [[ "$JSCPD" == "failure" ]] && failed+=("JSCPD")
78+
79+ if (( ${#failed[@]} )); then
80+ joined=$(IFS=', '; echo "${failed[*]}")
81+ echo "::error title=Linter failures::The following checks failed: ${joined}. See the corresponding step logs above for details."
7282 exit 1
7383 fi
You can’t perform that action at this time.
0 commit comments