Skip to content
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

refactor(cli/rule): don't report unused suppression comments #2900

Merged
merged 1 commit into from
May 17, 2024

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented May 17, 2024

Summary

This PR brings several improvements to the --rule CLI option:

  • Unused suppression comments are now ignored when --rule is specified
    This was really noisy because running a single rule makes all suppression comments - except those of the run rule - unused.
  • A lint/ prefix can be sued to select a group or a rule.
    This allows the following execution:
    biome lint --rule=lint/suspicious
    biome lint --rule=lint/suspicious/noDebugger
  • We report a diagnostic when --rule=nursery is passed.
    Users should enable a specific nursery rule instead.

Test Plan

I added tests.

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-Changelog Area: changelog labels May 17, 2024
@Conaclos Conaclos merged commit 938ea1a into main May 17, 2024
15 checks passed
@Conaclos Conaclos deleted the conaclos/rule-cli-option-improvements branch May 17, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-CLI Area: CLI A-Project Area: project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant