+
Skip to content

fix(biome-js-analyze): fixed the diagnostic message for noFocusedTests to display the offending fn name #6599

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

vladimir-ivanov
Copy link
Contributor

@vladimir-ivanov vladimir-ivanov commented Jun 27, 2025

Summary

Fixed #6380: The noFocusedTests rule now correctly displays the function name in the diagnostic message when a test is focused.

Every instance of a focused test function (like fdescribe, fit, ftest) had the word 'only' hardcoded.
This has been updated to use the actual function name, so the message is now more accurate and specific.

Example for fdescribe:

│-  i The 'only' method is often used for debugging or during implementation. It should be removed before deploying to production.
│+  i The fdescribe method is often used for debugging or during implementation. It should be removed before deploying to production.

Copy link

changeset-bot bot commented Jun 27, 2025

🦋 Changeset detected

Latest commit: 77a4a15

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 A-CLI Area: CLI A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Jun 27, 2025
@vladimir-ivanov vladimir-ivanov changed the title Fix/no focused tests diagnostics contain correct fn name fix(biome-js-analyze): fixed the diagnostic message for noFocusedTests to display the offending fn name Jun 27, 2025
Copy link

codspeed-hq bot commented Jun 27, 2025

CodSpeed Performance Report

Merging #6599 will not alter performance

Comparing vladimir-ivanov:fix/no_focused_tests_diagnostics_contain_correct_fn_name (77a4a15) with main (8aaf1ae)

Summary

✅ 115 untouched benchmarks

@vladimir-ivanov
Copy link
Contributor Author

review please :-)

@github-actions github-actions bot removed A-Project Area: project A-Diagnostic Area: diagnostocis labels Jun 27, 2025
@vladimir-ivanov vladimir-ivanov requested a review from dyc3 June 27, 2025 20:10
@vladimir-ivanov vladimir-ivanov enabled auto-merge (squash) June 27, 2025 20:56
@vladimir-ivanov vladimir-ivanov force-pushed the fix/no_focused_tests_diagnostics_contain_correct_fn_name branch from 5986ab1 to 84a741c Compare June 27, 2025 20:58
@github-actions github-actions bot added A-Project Area: project A-LSP Area: language server protocol L-JSON Language: JSON and super languages A-Diagnostic Area: diagnostocis labels Jun 27, 2025
@github-actions github-actions bot removed A-Project Area: project A-LSP Area: language server protocol A-Diagnostic Area: diagnostocis labels Jun 28, 2025
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.

Left few changes for the changeset. Thank you!

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

Just a couple of minor things regarding the lint message.

vladimir-ivanov and others added 2 commits June 29, 2025 08:05
…rect_fn_name.md

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
…rect_fn_name.md

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
@vladimir-ivanov vladimir-ivanov requested a review from dyc3 June 29, 2025 07:41
Comment on lines +10 to +15
Example for `fdescribe`:

```diff
-│i The 'only' method is often used for debugging or during implementation. It should be removed before deploying to production.
+│i The fdescribe method is often used for debugging or during implementation. It should be removed before deploying to production.
```
Copy link
Contributor

Choose a reason for hiding this comment

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

changeset needs to be updated

@vladimir-ivanov vladimir-ivanov merged commit 5e611fa into biomejs:main Jun 29, 2025
29 checks passed
@github-actions github-actions bot mentioned this pull request Jun 29, 2025
@vladimir-ivanov vladimir-ivanov deleted the fix/no_focused_tests_diagnostics_contain_correct_fn_name branch June 30, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Linter Area: linter L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💅 Possible false positive for lint/suspicious/noFocusedTests on functions named fit
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载