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

Skip to content

Conversation

@jonaylor89
Copy link

Summary

Adds --only and --skip options to the biome check and biome ci commands, matching the existing functionality in biome lint.

Closes #7849

Motivation

Skipping the project domain can speed up agentic workflows and local development when linting + formatting is desired since the project domain is very heavy and rarely has errors. This allows devs and agents to run the full check that CI would do very quickly for iteration.

Example usage

# Skip the project domain for faster checks
biome check --skip=project .

# Run only specific rule groups in CI
biome ci --only=correctness --only=suspicious .

# Combine with other options
biome check --write --skip=project .

Test Plan

Updated CLI help snapshots
Verified options appear in --help output for both commands
Tested --skip=project and --only=correctness filter rules correctly

AI Assistance Disclosure

This PR heavily used ampcode for scoping the feature and implementing the change. I supervised and did an additional code review with Codex

Amp Thread

@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2025

⚠️ No Changeset found

Latest commit: 5df03e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the A-CLI Area: CLI label Dec 21, 2025
@jonaylor89 jonaylor89 changed the title add --skip and --only to check and ci commands feat: add --skip and --only to check and ci commands Dec 21, 2025
@jonaylor89 jonaylor89 marked this pull request as ready for review December 21, 2025 18:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 21, 2025

Walkthrough

Adds --only and --skip CLI options (accepting GROUP|RULE|DOMAIN) to Check, Lint and Ci commands. New only: Vec<AnalyzerSelector> and skip: Vec<AnalyzerSelector> fields are added to command payloads and propagated into Execution/TraversalMode (Check, Lint, CI) and Execution::new_ci. File-analysis paths (lint_and_assist.rs, std_in.rs, scan_kind test) are updated to extract and apply these selectors when filtering files.

Possibly related PRs

Suggested reviewers

  • siketyan

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining motivation, providing examples, and referencing the linked issue #7849.
Linked Issues check ✅ Passed The PR implements all coding requirements from #7849: adds --skip and --only options to check and ci commands, enabling domain/rule filtering to improve performance.
Out of Scope Changes check ✅ Passed All changes directly support the feature scope: CLI field additions, command payload updates, and traversal mode propagation align with adding --skip and --only functionality.
Title check ✅ Passed The title clearly summarises the main change: adding --skip and --only flags to check and ci commands, matching the PR's primary objective.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_cli/src/commands/mod.rs (1)

1046-1050: Extend the pattern match to include TraversalMode::Check and TraversalMode::CI.

All three modes contain only and skip fields. The condition at line 1046 currently only extracts them for Lint, causing the rule selectors to be ignored for Check and CI commands. Update to match all three modes together like other parts of the codebase do.

📜 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 4e7baf3 and 94cef6b.

⛔ Files ignored due to path filters (2)
  • crates/biome_cli/tests/snapshots/main_commands_check/check_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/ci_help.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (8)
  • crates/biome_cli/src/commands/check.rs (3 hunks)
  • crates/biome_cli/src/commands/ci.rs (3 hunks)
  • crates/biome_cli/src/commands/mod.rs (2 hunks)
  • crates/biome_cli/src/commands/scan_kind.rs (1 hunks)
  • crates/biome_cli/src/execute/mod.rs (4 hunks)
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs (1 hunks)
  • crates/biome_cli/src/execute/std_in.rs (1 hunks)
  • crates/biome_cli/src/lib.rs (4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
crates/**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Update inline rustdoc documentation for rules, assists, and their options when adding new features or changing existing features in Rust crates

Files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/scan_kind.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
🧠 Learnings (51)
📓 Common learnings
Learnt from: arendjr
Repo: biomejs/biome PR: 7593
File: crates/biome_service/src/workspace/server.rs:1306-1306
Timestamp: 2025-09-25T12:32:59.003Z
Learning: In the biomejs/biome project, do not flag compilation errors during code review as they are handled by the existing test infrastructure and CI. Focus on other code quality aspects instead.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/scan_kind.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Lines prefixed with `#` in rule documentation code examples will be hidden from output

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/commands/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Return `Option<State>` from `run` function for single diagnostic signals

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use try operator `?` when `run` function returns `Option` to transform `Result` into `Option`

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `let else` trick when `run` function returns `Vec` to reduce code branching

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation code blocks should be ordered as language, expect_diagnostic, options/full_options/use_options, ignore, file

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_cli/src/commands/ci.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use helper functions like `map`, `filter`, and `and_then` to avoid deep indentation

Applied to files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : The first paragraph of rule documentation must be a single line describing what the rule does

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-12T10:11:05.564Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-12T10:11:05.564Z
Learning: Applies to crates/**/*.rs : Update inline rustdoc documentation for rules, assists, and their options when adding new features or changing existing features in Rust crates

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `error` for rules in correctness, security, and a11y groups

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` or `warn` for rules in style group

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `file=<path>` property for multi-file rule documentation examples

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use language-specific rule names if the rule is meant for a specific language only

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `info` for code action rules in analyzer

Applied to files:

  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/language_kind.rs : Add a new variant to `LanguageKind` enum in `language_kind.rs` file and implement all methods for the new language variant

Applied to files:

  • crates/biome_cli/src/commands/scan_kind.rs
📚 Learning: 2025-11-24T18:05:42.356Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : Distinguish between `TypeData::Unknown` and `TypeData::UnknownKeyword` to measure inference effectiveness versus explicit user-provided unknown types

Applied to files:

  • crates/biome_cli/src/commands/scan_kind.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/language_kind.rs : Add a new language prefix to the `LANGUAGE_PREFIXES` constant in `language_kind.rs` file

Applied to files:

  • crates/biome_cli/src/commands/scan_kind.rs
📚 Learning: 2025-11-24T18:04:57.309Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:04:57.309Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper types from the biome_diagnostics::v2 module (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) or implement the Advices trait yourself for custom advice handling

Applied to files:

  • crates/biome_cli/src/commands/scan_kind.rs
📚 Learning: 2025-11-24T18:05:42.356Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : Store type data in linear vectors instead of using recursive data structures with `Arc` for improved data locality and performance

Applied to files:

  • crates/biome_cli/src/commands/scan_kind.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/commands/check.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_cli/src/execute/mod.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` for rules in performance group

Applied to files:

  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `info` for rules in complexity group

Applied to files:

  • crates/biome_cli/src/execute/mod.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/Cargo.toml : Include development dependencies in `Cargo.toml` for formatter tests: `biome_formatter_test`, `biome_<language>_factory`, `biome_<language>_parser`, `biome_parser`, `biome_service`, `countme`, `iai`, `quickcheck`, `quickcheck_macros`, and `tests_macros`

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:06:03.545Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:06:03.545Z
Learning: Applies to crates/biome_parser/**/src/**/*.rs : Use `ParseSeparatedList` and `ParseNodeList` for parsing lists with error recovery to avoid infinite loops

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Import the `FormatNode` trait and implement it for your Node when creating formatters in biome_js_formatter

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Use the `just gen-formatter` command to generate initial formatter implementations from the grammar, which will use `format_verbatim_node` that must be replaced with proper `biome_formatter` utilities

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/lib.rs : Expose a public `format_node` function that accepts formatting options and a root syntax node, returning a `FormatResult<Formatted<Context>>` with appropriate documentation

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:27.810Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:27.810Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : For tokens that are not mandatory, use helper functions instead of hardcoding

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/src/context.rs : Define `<Language>FormatContext` struct in a `context.rs` file containing `comments` and `source_map` fields, implementing `FormatContext` and `CstFormatContext` traits

Applied to files:

  • crates/biome_cli/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `language` field in `declare_lint_rule!` macro to the language the rule primarily applies to

Applied to files:

  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
📚 Learning: 2025-12-19T12:53:30.399Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.399Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement Queryable trait for custom query match types in analyzer rules

Applied to files:

  • crates/biome_cli/src/commands/check.rs
🧬 Code graph analysis (1)
crates/biome_cli/src/execute/std_in.rs (1)
crates/biome_cli/src/execute/mod.rs (1)
  • new (299-305)
🔇 Additional comments (14)
crates/biome_cli/src/commands/scan_kind.rs (1)

129-131: LGTM!

Test fixture correctly updated to include the new only and skip fields with empty vectors.

crates/biome_cli/src/execute/std_in.rs (1)

150-155: LGTM!

Clean multi-pattern match that unifies handling of only/skip extraction across Lint, Check, and CI modes. The fallback to empty vectors for other traversal modes is sensible.

crates/biome_cli/src/execute/process_file/lint_and_assist.rs (1)

59-64: LGTM!

Consistent multi-pattern extraction of only/skip selectors. The cloning strategy is correct—clones are passed to fix_file whilst originals are consumed by pull_diagnostics.

crates/biome_cli/src/commands/check.rs (2)

36-37: LGTM!

New only and skip fields added to the payload struct, mirroring the existing pattern in LintCommandPayload.


167-168: LGTM!

Fields correctly propagated into TraversalMode::Check construction.

crates/biome_cli/src/commands/ci.rs (2)

33-34: LGTM!

CiCommandPayload extended with the new selector fields, consistent with the check command changes.


151-152: LGTM!

Selectors correctly passed through to Execution::new_ci.

crates/biome_cli/src/lib.rs (2)

97-98: LGTM!

Check command now correctly extracts and passes only/skip selectors to its payload.

Also applies to: 119-120


186-187: LGTM!

CI command wiring is consistent with the check command pattern.

Also applies to: 204-205

crates/biome_cli/src/execute/mod.rs (3)

116-123: LGTM!

Good documentation for the new only and skip fields in TraversalMode::Check. The rustdoc clearly explains the behaviour when severity is off and the precedence of --skip over --only.


163-169: LGTM!

Documentation for TraversalMode::CI mirrors the Check variant—consistency is key.


307-335: LGTM!

Execution::new_ci signature and implementation correctly extended to accept and propagate the new selectors.

crates/biome_cli/src/commands/mod.rs (2)

206-227: LGTM! Documentation and examples are clear.

The --only and --skip options are well documented with practical examples. The implementation matches the existing pattern from the Lint command.


465-486: LGTM! Consistent implementation across commands.

The Ci command additions mirror the Check command, maintaining consistency across the CLI surface.

@jonaylor89 jonaylor89 changed the title feat: add --skip and --only to check and ci commands feat(cli): add --skip and --only to check and ci commands Dec 21, 2025
@dyc3
Copy link
Contributor

dyc3 commented Dec 22, 2025

This will at least need a changeset

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you @jonaylor89

This is an early review

  • the PR must be sent to next as per contribution guide
  • the changeset is missing (the bot said it too), please follow the contribution guide about to write one
  • docs must be updated, as per discussion in the issue, the new flags also must apply for assist actions too

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.

📎 Add --skip option to ci and check commands

3 participants