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 streamlines the project's Checkstyle integration by isolating it into a dedicated CI job. This separation allows for more efficient management of Checkstyle updates through Dependabot and optimizes build times by preventing Checkstyle from running on non-Linux environments. The configuration now explicitly targets Java 24 on Linux to meet the requirements of Checkstyle 13+.

Highlights

  • Checkstyle CI Job: Checkstyle execution has been moved from the general test phase into its own dedicated CI job.
  • Platform Optimization: Test runs on Windows and macOS will now be faster as Checkstyle will no longer be executed on these platforms.
  • Java Version Requirement: Checkstyle 13+ now runs on Java 24 on Linux, addressing its requirement for Java 21 or newer.
  • Dependabot Compatibility: This change enables Dependabot to independently update the Checkstyle version.
  • Maven Configuration: The maven-checkstyle-plugin is now configured globally in pom.xml, and the checkstyle-jdk21 profile has been removed.
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.

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]>
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 refactors the Maven configuration to run Checkstyle in a dedicated CI job. By moving the maven-checkstyle-plugin out of a profile and removing its binding to the test phase, the build process is made more flexible and efficient, accommodating the JDK requirement for the newer Checkstyle version. The changes are clear and achieve the intended goal. I have one suggestion to further improve the maintainability of the pom.xml.

Comment on lines +76 to +93
<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>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<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

For improved maintainability, consider managing plugin and dependency versions using properties. Centralizing versions in the <properties> section makes them easier to manage and update across the project. This is a common Maven best practice.

For example, you could add these to your <properties> block:

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

Then you can reference them in this plugin definition using ${...}. This approach simplifies version updates and improves consistency, especially when used with the versions-maven-plugin which is already part of this project.

@oschwald oschwald merged commit 6197542 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