Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ematipico
Copy link
Member

Summary

Closes #7838

The code fix has been implemented by me, I used AI to generate the tests.

Test Plan

CI should pass

Docs

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2025

🦋 Changeset detected

Latest commit: 0d10c4c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

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

@github-actions github-actions bot added the A-CLI Area: CLI label Oct 24, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Walkthrough

This patch fixes a bug preventing the biome ci command from recognising newly introduced CSS and JSON parser CLI arguments. The fix changes parser configuration merging from clone_from to merge_with, allowing CLI-provided settings to properly merge with existing configurations rather than overwriting them. New tests verify CI-specific CSS parsing paths with various flag combinations, including CSS Modules and Tailwind directives options.

Possibly related PRs

Suggested labels

A-CLI, L-CSS

Suggested reviewers

  • dyc3
  • siketyan

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix(cli): css parsing arguments for ci command" directly aligns with the main objective of the pull request, which is to fix how CSS parsing arguments are handled in the biome ci command. The title is concise, specific, and clearly communicates the primary change without being vague or overly broad.
Linked Issues Check ✅ Passed The pull request directly addresses the primary objective from issue #7838 by changing CSS parser configuration merging from clone_from (overwrite) to merge_with (merge) in the CI command. This ensures that CLI-provided CSS arguments like --css-linter-enabled=false and --css-formatter-enabled=false are properly respected, preventing unwanted CSS checks from running. The addition of comprehensive tests validates that the CSS parsing arguments now work correctly with the CI command [#7838].
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly scoped to fixing the CSS parsing arguments issue in the CI command. The modifications to crates/biome_cli/src/commands/ci.rs address the core problem, the new tests in crates/biome_cli/tests/cases/css_parsing.rs validate the fix, and the changelog entry in .changeset/ documents the patch. No extraneous or unrelated changes are present.
Description Check ✅ Passed The description is appropriately related to the changeset. It identifies the linked issue (#7838), explains that the code fix was implemented by the author with AI-generated tests, and references the test plan. Although brief, it provides sufficient context about what problem is being addressed without being vague or generic.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci-css-parsing-args

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 53ffa8b and 0d10c4c.

⛔ Files ignored due to path filters (4)
  • crates/biome_cli/tests/snapshots/main_cases_css_parsing/ci_combined_css_parser_flags.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_css_parsing/ci_css_parse_css_modules_false.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_css_parsing/ci_css_parse_css_modules_true.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_css_parsing/ci_css_parse_tailwind_directives_false.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/afraid-meals-help.md (1 hunks)
  • crates/biome_cli/src/commands/ci.rs (1 hunks)
  • crates/biome_cli/tests/cases/css_parsing.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
.changeset/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/*.md: In changesets, only use #### or ##### headers; other header levels are not allowed
Changesets should cover user-facing changes only; internal changes do not need changesets
Use past tense for what you did and present tense for current Biome behavior in changesets
When fixing a bug in a changeset, start with an issue link (e.g., “Fixed #1234: …”)
When referencing a rule or assist in a changeset, include a link to its page on the website
Include code blocks in changesets when applicable to illustrate changes
End every sentence in a changeset with a period

Files:

  • .changeset/afraid-meals-help.md
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_cli/tests/cases/css_parsing.rs
  • crates/biome_cli/src/commands/ci.rs
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_cli/tests/cases/css_parsing.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_cli/tests/cases/css_parsing.rs
  • crates/biome_cli/src/commands/ci.rs
🧬 Code graph analysis (2)
crates/biome_cli/tests/cases/css_parsing.rs (2)
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/commands/ci.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • CssConfiguration (120-141)
🪛 LanguageTool
.changeset/afraid-meals-help.md

[style] ~5-~5: Would you like to use the Oxford spelling “recognized”? The spelling ‘recognised’ is also correct.
Context: ...new --css-parse-* arguments not being recognised by the ci command.

(OXFORD_SPELLING_Z_NOT_S)

⏰ 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). (7)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
🔇 Additional comments (5)
crates/biome_cli/src/commands/ci.rs (1)

87-89: Correct fix for CSS parser flag recognition.

The change from clone_from to merge_with properly allows CLI-provided CSS parser flags to merge with existing configuration rather than overwriting it. This resolves the issue where --css-parse-* arguments weren't being respected.

crates/biome_cli/tests/cases/css_parsing.rs (3)

222-274: Good test coverage for CI CSS Modules parsing.

These tests properly validate that the ci command respects the --css-parse-css-modules flag in both enabled and disabled states, mirroring the coverage provided for the check command.


310-342: Completes Tailwind directives test coverage.

This test complements the existing ci_css_parse_tailwind_directives_true test, ensuring both enabled and disabled states are validated for the CI command.


344-378: Excellent coverage of combined parser flags.

Testing multiple CSS parser flags together is crucial for ensuring they interact correctly. This validates that --css-parse-css-modules and --css-parse-tailwind-directives work harmoniously in CI workflows.

.changeset/afraid-meals-help.md (1)

1-5: Changeset follows guidelines correctly.

The changeset properly documents the patch-level fix with an issue reference, uses appropriate tense, and ends with a period. The spelling "recognised" is correct for British English, so the static analysis hint can be disregarded.

@ematipico
Copy link
Member Author

I'll fix the linting in another PR. The fix is rather urgent

@ematipico ematipico merged commit 72afdfa into main Oct 24, 2025
12 of 13 checks passed
@ematipico ematipico deleted the fix/ci-css-parsing-args branch October 24, 2025 13:24
@github-actions github-actions bot mentioned this pull request Oct 24, 2025
Jagget pushed a commit to Jagget/biome that referenced this pull request Oct 27, 2025
Conaclos pushed a commit that referenced this pull request Nov 1, 2025
kira134679 added a commit to kira134679/travel-site that referenced this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 biome ci does not respect --css-linter-enabled=false --css-formatter-enabled=false

3 participants