Skip to content

Cleaned up some of code. Added manual flywheel control in teleop. #97

Cleaned up some of code. Added manual flywheel control in teleop.

Cleaned up some of code. Added manual flywheel control in teleop. #97

Workflow file for this run

name: Lint
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
ktlint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:

Check failure on line 15 in .github/workflows/ktlint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ktlint.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run ktlint
run: |
if [[ "${{ github.event_name }}" == "push" || "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
./gradlew ktlintCheck --no-daemon
else
./gradlew ktlintFormat --no-daemon
fi
- name: Commit formatting changes
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
run: |
if [[ -n $(git status --porcelain) ]]; then
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "style: apply ktlint formatting [bot]"
git push
fi