@@ -35,10 +35,14 @@ jobs:
3535 - name : Run
3636 run : wpiformat
3737 - name : Check output
38- run : git --no-pager diff --exit-code HEAD
39- - name : Print linting docs link
40- if : ${{ failure()}}
41- run : echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
38+ run : |
39+ set -e
40+ git --no-pager diff --exit-code HEAD
41+ exit_code=$?
42+ if test "$exit_code" -ne "0"; then
43+ echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
44+ exit $exit_code
45+ fi
4246 - name : Generate diff
4347 run : git diff HEAD > wpiformat-fixes.patch
4448 if : ${{ failure() }}
@@ -59,12 +63,15 @@ jobs:
5963 with :
6064 java-version : 17
6165 distribution : temurin
62- - run : ./gradlew spotlessCheck
66+ - run : |
67+ set -e
68+ ./gradlew spotlessCheck
69+ exit_code=$?
70+ if test "$exit_code" -ne "0"; then
71+ echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
72+ exit $exit_code
73+ fi
6374 name: Run spotless
64- - name : Print linting docs link
65- if : ${{ failure() }}
66- run : echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
67-
6875 client-lint-format :
6976 name : " PhotonClient Lint and Formatting"
7077 defaults :
8693 - name : Install Dependencies
8794 run : pnpm i --frozen-lockfile
8895 - name : Check Linting
89- run : pnpm run lint-ci
96+ run : |
97+ set -e
98+ pnpm run lint-ci
99+ exit_code=$?
100+ if test "$exit_code" -ne "0"; then
101+ echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
102+ exit $exit_code
103+ fi
90104 - name : Check Formatting
91- run : pnpm run format-ci
92- - name : Print linting docs link
93- if : ${{ failure() }}
94- run : echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
105+ run : |
106+ set -e
107+ pnpm run format-ci
108+ exit_code=$?
109+ if test "$exit_code" -ne "0"; then
110+ echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html"
111+ exit $exit_code
112+ fi
0 commit comments