Conversation
…d by Indexer.java
- added Artifact array to keep track of what colors are in which positions - added stateToColor() - added scanArtifact() - added enum ArtifactColor - added shiftArtifacts() - added moveToColor() - edited moveTo() to yield the thread until the servo finishes turning
…m the array if the ramp actuator is activated
…ent-fixes # Conflicts: # TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing/AprilTagTester.java
…e, optimizations to hopefully get cleaner autoaim
…on control class to help us move to certian positons using CR Servo the control class is PIDF vibe code so dont expect it to work first time
…on control class to help us move to certian positons using CR Servo the control class is PIDF vibe code so dont expect it to work first time
# Conflicts: # TeamCode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/CRServoPositionControl.java
…gree turn for intuition of colors without color sensro
(Comments, telemetry, unnecessary code, more FSM)
There was a problem hiding this comment.
Pull request overview
This pull request adds three GitHub Actions workflows to automate code quality checks for pull requests and pushes to the Quali-1 branch. The workflows provide continuous integration capabilities including static analysis, code formatting validation, and build/lint/test automation.
Key changes:
- SpotBugs static analysis workflow for the TeamCode module
- Google Java Format validation for Java source files in TeamCode
- Comprehensive CI workflow that builds, lints, and tests the project
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
.github/workflows/spotbugs-teamcode.yml |
Adds SpotBugs static analysis workflow with intelligent task detection for Android/Gradle projects |
.github/workflows/format-java.yml |
Adds Google Java Format validation workflow to ensure consistent code formatting |
.github/workflows/ci.yml |
Adds main CI workflow for building, linting, and testing the FTC robot controller project |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - "gradle.properties" | ||
| - "gradlew" | ||
| - "gradlew.bat" | ||
| - ".github/workflows/**" |
There was a problem hiding this comment.
The path filter '.github/workflows/**' will trigger this workflow when any workflow file changes. This could cause unnecessary CI runs when unrelated workflows are modified. Consider being more specific about which workflow changes should trigger the full CI build, or remove this path if changes to workflows should always trigger CI validation.
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "17" |
There was a problem hiding this comment.
The workflow sets up JDK 17, but TeamCode/build.gradle specifies Java 16 for sourceCompatibility/targetCompatibility and Java 21 for the toolchain. This version mismatch could lead to formatting or build inconsistencies. Consider aligning the JDK version in the workflow with the toolchain version (21) specified in the Gradle build, or ensuring the workflow uses a JDK version that matches your project's actual requirements.
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" |
| - ".github/workflows/spotbugs-teamcode.yml" | ||
|
|
||
| concurrency: | ||
| group: spotbugs-${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
The concurrency group name 'spotbugs-${{ github.workflow }}-${{ github.ref }}' includes redundant information since github.workflow already contains the workflow name. This pattern is inconsistent with the other workflows which use 'format-' and 'ci-' prefixes. Consider using just '${{ github.workflow }}-${{ github.ref }}' for consistency across all workflows, or ensure all workflows follow the same naming pattern.
| group: spotbugs-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
| - ".github/workflows/**" | ||
|
|
||
| concurrency: | ||
| group: format-${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
The concurrency group name 'format-${{ github.workflow }}-${{ github.ref }}' includes redundant information since github.workflow already contains the workflow name. This pattern is inconsistent with the other workflows. Consider using just '${{ github.workflow }}-${{ github.ref }}' for consistency across all workflows, or ensure all workflows follow the same naming pattern.
| group: format-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
| skip-commit: true | ||
|
|
||
| - name: Fail if formatting changed (prints diff) | ||
| run: git --no-pager diff --exit-code |
There was a problem hiding this comment.
The step name 'Fail if formatting changed (prints diff)' doesn't provide a helpful error message when formatting issues are found. Consider adding an error message before the git diff command to explain what the developer needs to do, such as: 'echo "::error::Code formatting issues detected. Please run google-java-format locally and commit the changes." && git --no-pager diff && exit 1' when differences are found.
| run: git --no-pager diff --exit-code | |
| run: | | |
| if ! git --no-pager diff --quiet; then | |
| echo "::error::Code formatting issues detected. Please run google-java-format locally on 'TeamCode/**/*.java' and commit the changes." | |
| git --no-pager diff | |
| exit 1 | |
| fi |
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "17" |
There was a problem hiding this comment.
The workflow sets up JDK 17, but TeamCode/build.gradle specifies Java 16 for sourceCompatibility/targetCompatibility and Java 21 for the toolchain. This version mismatch could lead to build inconsistencies between local development and CI. Consider aligning the JDK version in the workflow with the toolchain version (21) specified in the Gradle build, or ensuring the workflow uses a JDK version that matches your project's actual requirements.
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" |
| echo "::error::No SpotBugs task found for :TeamCode. Make sure the SpotBugs Gradle plugin is applied/configured for TeamCode." | ||
| echo "Here are any spotbugs-related tasks Gradle sees:" | ||
| ./gradlew -q :TeamCode:tasks --all | grep -i spotbugs || true | ||
| exit 1 | ||
| fi | ||
|
|
There was a problem hiding this comment.
The SpotBugs workflow will fail because the SpotBugs Gradle plugin is not applied in the TeamCode module or any build.gradle files. Before this workflow can function, you need to add the SpotBugs plugin to your Gradle configuration. Consider adding the plugin to TeamCode/build.gradle or build.common.gradle with proper configuration.
| echo "::error::No SpotBugs task found for :TeamCode. Make sure the SpotBugs Gradle plugin is applied/configured for TeamCode." | |
| echo "Here are any spotbugs-related tasks Gradle sees:" | |
| ./gradlew -q :TeamCode:tasks --all | grep -i spotbugs || true | |
| exit 1 | |
| fi | |
| echo "::warning::No SpotBugs task found for :TeamCode. SpotBugs will be skipped. Make sure the SpotBugs Gradle plugin is applied/configured for TeamCode if you expect these checks to run." | |
| echo "Here are any spotbugs-related tasks Gradle sees:" | |
| ./gradlew -q :TeamCode:tasks --all | grep -i spotbugs || true | |
| fi |
| - ".github/workflows/**" | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
The concurrency group name 'ci-${{ github.workflow }}-${{ github.ref }}' includes redundant information since github.workflow already contains the workflow name. This pattern is inconsistent with the other workflows. Consider using just '${{ github.workflow }}-${{ github.ref }}' for consistency across all workflows, or ensure all workflows follow the same naming pattern.
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| group: ${{ github.workflow }}-${{ github.ref }} |
| - ".github/workflows/**" | ||
| push: | ||
| branches: | ||
| - "Quali-1" | ||
| paths: | ||
| - "TeamCode/**/*.java" | ||
| - ".github/workflows/**" |
There was a problem hiding this comment.
The path filter '.github/workflows/**' will trigger this workflow when any workflow file changes, not just this specific workflow. This could cause unnecessary CI runs when unrelated workflows are modified. Consider using '.github/workflows/format-java.yml' to only trigger on changes to this specific workflow file, matching the pattern used in spotbugs-teamcode.yml.
| - ".github/workflows/**" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/**" | |
| - ".github/workflows/format-java.yml" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/format-java.yml" |
| - ".github/workflows/**" | ||
| push: | ||
| branches: | ||
| - "Quali-1" | ||
| paths: | ||
| - "TeamCode/**/*.java" | ||
| - ".github/workflows/**" |
There was a problem hiding this comment.
The path filter '.github/workflows/**' will trigger this workflow when any workflow file changes, not just this specific workflow. This could cause unnecessary CI runs when unrelated workflows are modified. Consider using '.github/workflows/format-java.yml' to only trigger on changes to this specific workflow file, matching the pattern used in spotbugs-teamcode.yml.
| - ".github/workflows/**" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/**" | |
| - ".github/workflows/format-java.yml" | |
| push: | |
| branches: | |
| - "Quali-1" | |
| paths: | |
| - "TeamCode/**/*.java" | |
| - ".github/workflows/format-java.yml" |
Before issuing a pull request, please see the contributing page.