Skip to content

feat(CI): Added GitHub Actions to check for code style violations #5

feat(CI): Added GitHub Actions to check for code style violations

feat(CI): Added GitHub Actions to check for code style violations #5

Workflow file for this run

name: Format Files
on:
pull_request:
jobs:
format:
name: Check if files need formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Maven
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
- name: Check if code aligns with code style
id: spotless
run: mvn spotless:check
continue-on-error: true
- name: Comment on PR
if: ${{ steps.spotless.outcome == 'failure' }}
run: |
gh pr review ${{ github.event.number }} --body "Code does not align with code style. Please run \`mvn spotless:apply\` and commit the changes."
with:

Check failure on line 26 in .github/workflows/format.yml

View workflow run for this annotation

GitHub Actions / Format Files

Invalid workflow file

The workflow is not valid. .github/workflows/format.yml (Line: 26, Col: 9): Unexpected value 'with'
github-token: ${{ secrets.GITHUB_TOKEN }}