diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0d5211e4a4..704a41b1ac 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,7 +11,6 @@ Merge checklist: - [ ] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [ ] The description documents the _what_ and _why_ -- [ ] This PR has been [linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html). - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 9333d91327..ebd69ac83b 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -35,7 +35,14 @@ jobs: - name: Run run: wpiformat - name: Check output - run: git --no-pager diff --exit-code HEAD + run: | + set +e + git --no-pager diff --exit-code HEAD + exit_code=$? + if test "$exit_code" -ne "0"; then + echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html" + exit $exit_code + fi - name: Generate diff run: git diff HEAD > wpiformat-fixes.patch if: ${{ failure() }} @@ -56,9 +63,15 @@ jobs: with: java-version: 17 distribution: temurin - - run: ./gradlew spotlessCheck + - run: | + set +e + ./gradlew spotlessCheck + exit_code=$? + if test "$exit_code" -ne "0"; then + echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html" + exit $exit_code + fi name: Run spotless - client-lint-format: name: "PhotonClient Lint and Formatting" defaults: @@ -80,6 +93,20 @@ jobs: - name: Install Dependencies run: pnpm i --frozen-lockfile - name: Check Linting - run: pnpm run lint-ci + run: | + set +e + pnpm run lint-ci + exit_code=$? + if test "$exit_code" -ne "0"; then + echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html" + exit $exit_code + fi - name: Check Formatting - run: pnpm run format-ci + run: | + set +e + pnpm run format-ci + exit_code=$? + if test "$exit_code" -ne "0"; then + echo "::error ::Linting failed. See https://docs.photonvision.org/en/latest/docs/contributing/linting.html" + exit $exit_code + fi