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.

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 <[email protected]>
@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 streamlines the Checkstyle integration within the project's build system. By decoupling Checkstyle from the standard test phase and moving it to a dedicated CI job, the change facilitates easier version management through Dependabot and enhances build efficiency by selectively running Checkstyle only on Linux with the necessary Java version. This ensures code quality checks are performed effectively without impeding other platform-specific test executions.

Highlights

  • Dedicated Checkstyle CI Job: Checkstyle execution is now a dedicated CI job, separate from the test phase.
  • Dependabot Compatibility: Enabled independent updates for Checkstyle via Dependabot.
  • Improved Test Performance: Improved test run speeds on Windows and macOS by excluding Checkstyle from those platforms.
  • Java Version Alignment: Configured Checkstyle to run on Java 24 on Linux, meeting the Java 21+ requirement for Checkstyle 13+.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/checkstyle.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 refactors the Checkstyle configuration by moving it from a profile-based execution during the test phase to a standalone plugin definition. This change is intended to facilitate running Checkstyle in a dedicated CI job, especially since it now requires Java 21+, and to speed up local builds on other platforms. The changes in pom.xml correctly implement this by removing the checkstyle-jdk21 profile and adding the maven-checkstyle-plugin to the main build plugins without an execution binding. My review includes a suggestion to improve maintainability by managing the plugin and dependency versions through properties, which is a common best practice in Maven projects.

Comment on lines +134 to +145
<version>3.6.0</version>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>checkstyle.xml</configLocation>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>13.0.0</version>

Choose a reason for hiding this comment

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

medium

For better maintainability, it's a good practice to manage plugin and dependency versions in the <properties> section. This centralizes version numbers, making them easier to update and keep consistent.

You could define properties in the <properties> section like so:

<properties>
    ...
    <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
    <checkstyle.version>13.0.0</checkstyle.version>
</properties>

And then reference them here. This makes future updates much simpler.

Suggested change
<version>3.6.0</version>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>checkstyle.xml</configLocation>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>13.0.0</version>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>checkstyle.xml</configLocation>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>

@oschwald oschwald merged commit 5fb5fb5 into main Jan 13, 2026
27 checks passed
@oschwald oschwald deleted the wstorey/checkstyle-separate-job branch January 13, 2026 21:20
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