-
-
Couldn't load subscription status.
- Fork 732
feat(reporter): add checkstyle #6356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wrick17 for your contribution. Can you at least add some tests? Create a file this one
https://github.com/biomejs/biome/blob/main/crates/biome_cli/tests/cases/reporter_junit.rs
Provide the correct information in the CLI arguments, and commit the snapshots. This will allow us to see the format, and help you with further reviews.
Plus, the code doesn't compile. While, I appreciate the use of LLMs, we should at least provide a code that compiles.
If you can't go further than that, I would appreciate if you can provide a simple explanation of the checkstyle format, so some else can takeover
|
@wrick17 any news? |
|
@ematipico Sorry I hadn't noticed the comment. I'll try to provide all the information as soon as possible. |
🦋 Changeset detectedLatest commit: e4251b8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a Checkstyle reporter to the Biome CLI. CLI parsing/display are extended with a new Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (10)
crates/biome_cli/tests/snapshots/main_cases_reporter_checkstyle/reports_diagnostics_checkstyle_check_command.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_reporter_checkstyle/reports_diagnostics_checkstyle_ci_command.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_reporter_checkstyle/reports_diagnostics_checkstyle_format_command.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_reporter_checkstyle/reports_diagnostics_checkstyle_lint_command.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_check/check_help.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_ci/ci_help.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_help.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_lint/lint_help.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_migrate/migrate_help.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_rage/rage_help.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (7)
.changeset/light-women-live.md(1 hunks)crates/biome_cli/src/cli_options.rs(4 hunks)crates/biome_cli/src/execute/mod.rs(4 hunks)crates/biome_cli/src/reporter/checkstyle.rs(1 hunks)crates/biome_cli/src/reporter/mod.rs(1 hunks)crates/biome_cli/tests/cases/mod.rs(1 hunks)crates/biome_cli/tests/cases/reporter_checkstyle.rs(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/**/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/**/*.md: Create changesets using thejust new-changesetcommand; do not author them manually
In changeset markdown, only use headers #### or #####
Changeset descriptions must end every sentence with a full stop (.)
For bug fixes, start the changeset description with a linked issue reference like “Fixed #1234”
Prefer past tense for what was done and present tense for current behavior in changesets
Files:
.changeset/light-women-live.md
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_cli/src/execute/mod.rscrates/biome_cli/src/cli_options.rscrates/biome_cli/src/reporter/mod.rscrates/biome_cli/tests/cases/reporter_checkstyle.rscrates/biome_cli/tests/cases/mod.rscrates/biome_cli/src/reporter/checkstyle.rs
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Before committing, format Rust and TOML files (e.g., via
just f/just format)
Files:
crates/biome_cli/src/execute/mod.rscrates/biome_cli/src/cli_options.rscrates/biome_cli/src/reporter/mod.rscrates/biome_cli/tests/cases/reporter_checkstyle.rscrates/biome_cli/tests/cases/mod.rscrates/biome_cli/src/reporter/checkstyle.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Document rules, assists, and options via inline rustdoc in Rust source
Files:
crates/biome_cli/src/execute/mod.rscrates/biome_cli/src/cli_options.rscrates/biome_cli/src/reporter/mod.rscrates/biome_cli/tests/cases/reporter_checkstyle.rscrates/biome_cli/tests/cases/mod.rscrates/biome_cli/src/reporter/checkstyle.rs
**/tests/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place test files under a tests/ directory in each crate
Files:
crates/biome_cli/tests/cases/reporter_checkstyle.rscrates/biome_cli/tests/cases/mod.rs
🧬 Code graph analysis (3)
crates/biome_cli/src/execute/mod.rs (1)
crates/biome_cli/src/reporter/checkstyle.rs (1)
new(35-37)
crates/biome_cli/tests/cases/reporter_checkstyle.rs (4)
crates/biome_cli/tests/main.rs (1)
run_cli(332-347)crates/biome_cli/tests/snap_test.rs (1)
assert_cli_snapshot(407-409)crates/biome_cli/src/execute/mod.rs (4)
new(280-286)from(77-79)from(89-91)from(263-276)crates/biome_cli/src/reporter/checkstyle.rs (1)
new(35-37)
crates/biome_cli/src/reporter/checkstyle.rs (2)
crates/biome_cli/src/reporter/mod.rs (3)
write(49-49)report_summary(55-60)report_diagnostics(72-78)crates/biome_diagnostics/src/location.rs (1)
source_code(216-219)
|
@wrick17 I did the work and updated the PR. Please check the tests |
|
Docs biomejs/website#3194 |
Summary
Needed biome to report in checkstyle format so that we can use it in tools like Jenkins Warning Plugin. Plus it's a pretty popular reporting format.
Other people seem to be interested too #2287.
Test Plan
I have tested it locally and it works based on the limited testing I have done.
PS
I have no knowledge of Rust, took a lot of help from LLMs and manually tested it as much as possible. 🙏🏻