Skip to content

feat: add standalone Checkstyle linting - #435

Merged
zeitlinger merged 7 commits into
mainfrom
agent/checkstyle-support
Jul 27, 2026
Merged

feat: add standalone Checkstyle linting#435
zeitlinger merged 7 commits into
mainfrom
agent/checkstyle-support

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Jul 24, 2026

Copy link
Copy Markdown
Member

Blocked by #447

Summary

  • add standalone Checkstyle support using the curated JAR and Java runtime
  • treat Checkstyle warning/error output as a failed check
  • add generated documentation, tool pins, and focused end-to-end cases

Split from #430 so the Checkstyle integration can be reviewed independently.

Validation

  • mise run generate
  • mise run lint:fix
  • mise exec -- cargo test

@zeitlinger

Copy link
Copy Markdown
Member Author

Pre-release consumer validation is running in prometheus/client_java#2341.

The standalone all-files run initially found 165 warnings: 160 in test sources, one archived benchmark warning, and four example-source warnings. The consumer PR preserves client_java's existing Maven Checkstyle scope with narrow suppressions; flint run --full checkstyle, mise run lint:fix, and the full Maven build pass locally.

@zeitlinger

Copy link
Copy Markdown
Member Author

Checkstyle now uses the Aqua package from aquaproj/aqua-registry#57625. Current Flint CI failures are expected until that package is merged into the registry; the package PR is mergeable and all checks are green.

@zeitlinger

Copy link
Copy Markdown
Member Author

CI is currently waiting for the next mise release: the Checkstyle package was merged into aqua-registry in aquaproj/aqua-registry#57625, but mise v2026.7.13 still bundles an older Aqua registry snapshot.

@zeitlinger
zeitlinger changed the base branch from main to agent/dedicated-linter-docs July 26, 2026 10:04
Base automatically changed from agent/dedicated-linter-docs to main July 27, 2026 09:24
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger force-pushed the agent/checkstyle-support branch from 41e1d39 to a68fb51 Compare July 27, 2026 09:31
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger marked this pull request as ready for review July 27, 2026 11:20
@zeitlinger
zeitlinger requested a review from a team as a code owner July 27, 2026 11:20
Copilot AI review requested due to automatic review settings July 27, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds first-class, standalone Checkstyle support to Flint by registering a new checkstyle check (invoked via java -jar), treating warning/error markers as failures even when the process exits 0, and rounding out the integration with docs, tool pins, and focused end-to-end fixture cases.

Changes:

  • Add checkstyle to the built-in registry with baseline config expectations and failure-on-output markers ([WARN], [ERROR]).
  • Extend the runner/command spawning to support java -jar invocation and failing checks based on output patterns (stdout/stderr).
  • Add Checkstyle e2e cases plus generated docs and dependency/workflow pin updates.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/cases/checkstyle/warning/test.toml New e2e case asserting warning output causes a failed check
tests/cases/checkstyle/warning/files/mise.toml Fixture tool pin for Checkstyle
tests/cases/checkstyle/warning/files/Foo.java Java fixture input
tests/cases/checkstyle/warning/files/checkstyle.xml Minimal Checkstyle config fixture
tests/cases/checkstyle/missing-config/test.toml New e2e case for missing checkstyle.xml behavior
tests/cases/checkstyle/missing-config/files/mise.toml Fixture tool pin for Checkstyle
tests/cases/checkstyle/missing-config/files/Foo.java Java fixture input
tests/cases/checkstyle/clean/test.toml New e2e case for clean Checkstyle run
tests/cases/checkstyle/clean/files/mise.toml Fixture tool pin for Checkstyle
tests/cases/checkstyle/clean/files/Foo.java Java fixture input
tests/cases/checkstyle/clean/files/checkstyle.xml Minimal Checkstyle config fixture
src/runner.rs Add failure_output_patterns support and output scanning helper
src/registry/types.rs Introduce JavaJarMode + failure-output-patterns on Check
src/registry/checks.rs Register the new checkstyle check and its configuration
src/main.rs Update expected linter table output to include Checkstyle
src/linters/mod.rs Generalize JAR spawning to support java -jar (incl. non-Windows)
src/init/scaffold.rs Bump pinned mise version/hash in generated scaffold
README.md Add Checkstyle to the Java linter row in the top-level table
mise.toml Pin Checkstyle and adjust Renovate pin with trust-policy excludes
docs/linters/checkstyle.md New generated linter documentation page
docs/linters.md Add Checkstyle to the linter index table
default.json Add checkstyle to default tool enablement list
.github/workflows/test.yml Bump pinned mise version/hash in CI matrix
.github/workflows/release.yml Bump pinned mise version/hash in release workflow
.github/workflows/release-plz.yml Bump pinned mise version/hash in release-plz workflow
.github/workflows/mise-registry.yml Bump pinned mise version/hash in mise-registry workflow
.github/workflows/lint.yml Bump pinned mise version/hash in lint workflow
.github/renovate.json5 Track Checkstyle in Renovate-managed tool list
.github/renovate-tracked-deps.json Add Checkstyle datasource mapping and tracked tool list entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/cases/checkstyle/warning/test.toml Outdated
Comment thread mise.toml
# Conflicts:
#	.github/workflows/lint.yml
#	.github/workflows/mise-registry.yml
#	.github/workflows/release-plz.yml
#	.github/workflows/release.yml
#	.github/workflows/test.yml
#	src/init/scaffold.rs
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger
zeitlinger merged commit 72624e7 into main Jul 27, 2026
17 checks passed
@zeitlinger
zeitlinger deleted the agent/checkstyle-support branch July 27, 2026 13:48
@github-actions github-actions Bot mentioned this pull request Jul 27, 2026
zeitlinger pushed a commit that referenced this pull request Jul 27, 2026
## 🤖 New release

* `flint`: 0.22.9 -> 0.22.10

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.22.10](v0.22.9...v0.22.10) -
2026-07-27

### Added

- add safe dotenv linting
([#436](#436))
- add native Java formatting and regex replacements
([#407](#407))
- add scoped Kubernetes manifest linting
([#437](#437))
- add standalone Checkstyle linting
([#435](#435))
- improve Flint init and setup migrations
([#428](#428))
- define registry and execution contracts
([#427](#427))

### Fixed

- *(renovate)* avoid overlapping mise managers
([#446](#446))

### Other

- *(deps)* update dependency jdx/mise-action to v4.2.2
([#448](#448))
- make Windows aube installs cacheable
([#447](#447))
- *(deps)* update mise to v2026.7.12
([#444](#444))
- *(deps)* update linters
([#443](#443))
- move linter reference to dedicated pages
([#440](#440))
- *(deps)* lock file maintenance
([#445](#445))
- *(deps)* update taiki-e/install-action action to v2.85.0
([#442](#442))
- *(deps)* update taiki-e/install-action action to v2.84.1
([#441](#441))
- require silent happy paths for checks
([#439](#439))
- *(deps)* update grafana/shared-workflows/lint-pr-title action to
v1.2.4 ([#438](#438))
- add Linux musl release artifacts
([#421](#421))
- validate curated mise registry backends
([#429](#429))
- *(deps)* update rust crate tokio to v1.53.1
([#434](#434))
- *(deps)* update taiki-e/install-action action to v2.84.0
([#433](#433))
- *(deps)* update rust crate clap to v4.6.3
([#432](#432))
- *(deps)* update rust crate serde_json to v1.0.151
([#431](#431))
- record Flint v2 architecture decisions
([#426](#426))
- *(deps)* update taiki-e/install-action action to v2.83.4
([#423](#423))
- *(deps)* update actions/checkout digest to 3d3c42e
([#422](#422))
- *(deps)* update rust crate regex to v1.13.1
([#412](#412))
- document semantic PR title guidance
([#420](#420))
- *(deps)* update linters
([#418](#418))
- *(deps)* update dependency mise to v2026.7.7
([#417](#417))
- *(deps)* lock file maintenance
([#419](#419))
- *(deps)* update taiki-e/install-action action to v2.83.3
([#415](#415))
- *(deps)* update rust crate tokio to v1.52.4
([#414](#414))
- *(deps)* update dependency jdx/mise-action to v4.2.1
([#416](#416))
- *(deps)* update dependency rust to v1.97.1
([#413](#413))
- *(deps)* update rust crate clap to v4.6.2
([#411](#411))
- *(deps)* update rust crate globset to v0.4.19
([#410](#410))
- *(deps)* update rust crate toml_edit to v0.25.13
([#409](#409))
- *(deps)* update rust crate toml to v1.1.3
([#408](#408))
- document signed commit requirement
([#406](#406))
- batch rumdl file checks
([#404](#404))
- *(deps)* update taiki-e/install-action action to v2.83.2
([#405](#405))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants