Skip to content

Conversation

@horgh
Copy link
Contributor

@horgh horgh commented Jan 13, 2026

Move checkstyle out of the test phase and into a dedicated CI job. This allows dependabot to update the checkstyle version and speeds up test runs on Windows/macOS by not running checkstyle there.

Checkstyle 13+ requires Java 21+, so we run it on Java 24 on Linux.

@gemini-code-assist
Copy link

Summary of Changes

Hello @horgh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the project's Maven configuration to decouple Checkstyle execution from the main test phase. By moving Checkstyle into a dedicated plugin configuration and removing its profile-based execution, it enables running Checkstyle as an independent CI job on Linux with a modern Java version (Java 24). This change aims to improve CI efficiency by preventing Checkstyle from running on Windows/macOS test builds and enhances maintainability by allowing automated updates of the Checkstyle version via Dependabot.

Highlights

  • Checkstyle Decoupling: Checkstyle execution has been moved from being part of the test phase within a specific JDK profile to a standalone plugin configuration, allowing for more flexible integration.
  • Dedicated CI Job: This change enables Checkstyle to run as a separate CI job, specifically targeting Linux with Java 24, which is required for Checkstyle 13+.
  • Improved Test Performance: Test runs on Windows and macOS will no longer execute Checkstyle, leading to potentially faster CI build times on these platforms.
  • Dependabot Compatibility: The new configuration facilitates better management and automated updates of the Checkstyle version via Dependabot.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly moves the Checkstyle execution out of the test phase, setting it up for a dedicated CI job. This change will help speed up local builds on platforms where the check is not needed. I've added one comment regarding a potential inconsistency this change introduces with the Checkstyle version used for Maven site reporting. Adopting Maven best practices by centralizing the plugin configuration using <pluginManagement> would resolve this and improve long-term maintainability.

Comment on lines +132 to +148
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>checkstyle.xml</configLocation>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>13.0.0</version>
</dependency>
</dependencies>
</plugin>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This plugin definition correctly configures Checkstyle for CI runs. However, it creates an inconsistency with the maven-checkstyle-plugin configuration used for reporting (mvn site) on lines 278-292. The reporting plugin will use a different (older) version of Checkstyle because it doesn't have this explicit dependency override. This can lead to different validation results between the CI check and the generated site report.

To ensure consistency and follow Maven best practices, I recommend managing common plugin configurations in a <pluginManagement> section. This would allow both the build and reporting executions to share the same version and dependencies, preventing discrepancies and improving maintainability.

@horgh horgh force-pushed the wstorey/checkstyle-separate-job branch 2 times, most recently from 51eae60 to 13fe653 Compare January 13, 2026 20:09
horgh and others added 2 commits January 13, 2026 12:09
The reporting section for checkstyle is not used - mvn site is never
run in CI or documented in release process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move checkstyle out of the test phase and into a dedicated CI job.
This allows dependabot to update the checkstyle version and speeds
up test runs on Windows/macOS by not running checkstyle there.

Checkstyle 13+ requires Java 21+, so we run it on Java 24 on Linux.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@oschwald oschwald merged commit 0248f49 into main Jan 13, 2026
27 checks passed
@oschwald oschwald deleted the wstorey/checkstyle-separate-job branch January 13, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants