Initial import from 2024 swerve codebase #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Format | |
on: | |
pull_request: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
javaformat: | |
name: "Java format" | |
runs-on: ubuntu-22.04 | |
container: wpilib/ubuntu-base:22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fix Git permissions | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Run Java format | |
run: ./gradlew javaFormat spotbugsMain spotbugsTest | |
- name: Check output | |
run: git --no-pager diff --exit-code HEAD | |
- name: Generate diff | |
run: git diff HEAD > javaformat-fixes.patch | |
if: ${{ failure() }} |