-
-
Notifications
You must be signed in to change notification settings - Fork 728
fix(noDuplicateTestHooks): diagnostic message #7756
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
🦋 Changeset detectedLatest commit: 898f0b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
WalkthroughUpdates diagnostic text for the Suspicious/no_duplicate_test_hooks lint in crates/biome_js_analyze to reference the specific hook name and to change the note to warn that repeated hooks can cause unexpected errors and should be removed. Adds a changeset entry patching @biomejs/biome describing the improved diagnostic message. No behavioural code changes or exported/public API changes. 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 ignored due to path filters (4)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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). (11)
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 (1)
crates/biome_js_analyze/tests/specs/suspicious/noDuplicateTestHooks/invalid.js.snap
is excluded by!**/*.snap
and included by**
📒 Files selected for processing (2)
.changeset/witty-tools-love.md
(1 hunks)crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/**/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/**/*.md
: Create changesets using thejust new-changeset
command; 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/witty-tools-love.md
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}
Files:
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.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_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Document rules, assists, and options via inline rustdoc in Rust source
Files:
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs (1)
crates/biome_service/src/workspace.rs (1)
markup
(1130-1132)
⏰ 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). (11)
- GitHub Check: Test Node.js API
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: autofix
🔇 Additional comments (2)
.changeset/witty-tools-love.md (1)
1-5
: Changeset looks good.The format is correct, the description is clear, and it follows the guidelines (past tense, ends with full stop). Just ensure this was created using
just new-changeset
as per the coding guidelines.As per coding guidelines.
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs (1)
231-231
: Clearer diagnostic message.The new message "Detected multiple test hooks." is more direct and actionable than the previous version. Good improvement.
crates/biome_js_analyze/src/lint/suspicious/no_duplicate_test_hooks.rs
Outdated
Show resolved
Hide resolved
8d4306e
to
6b28add
Compare
CodSpeed Performance ReportMerging #7756 will not alter performanceComparing Summary
Footnotes
|
invalid.js:4:2 lint/suspicious/noDuplicateTestHooks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Disallow duplicate setup and teardown hooks. | ||
× The test hook beforeEach is used multiple times in the same test block. |
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.
funny saw the word hook and first reaction was to associate with react. :-)
6b28add
to
898f0b4
Compare
Summary
Improved message of
noDuplicateTestHooks
Test Plan
Updated snapshot test
Docs
N/A