+
Skip to content

Conversation

JeetuSuthar
Copy link
Contributor

What this fixes

Fixed a grammar mistake in an error message. The message was missing the word "is".

Before (incorrect):

This where a duplicated key was declared again.

After (correct):

This is where a duplicated key was declared again.

What changed

  • Fixed the grammar in the error message
  • Updated the test to match the corrected message

This makes the error message easier to read and understand for users.

Fixes #7307

Copy link
Contributor

coderabbitai bot commented Aug 24, 2025

Walkthrough

The PR fixes a user‑facing detail string in the per‑range diagnostic for the JSON rule suspicious/noDuplicateObjectKeys, changing "This where a duplicated key was declared again." to "This is where a duplicated key was declared again." No logic, control flow, data structures, or public APIs were changed.

Assessment against linked issues

Objective Addressed Explanation
Fix grammatically incorrect information message for JSON in lint/suspicious/noDuplicateObjectKeys (#7307)

Suggested labels

A-Linter

Suggested reviewers

  • ematipico
  • siketyan

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f47ba07 and 673d5b2.

⛔ Files ignored due to path filters (3)
  • crates/biome_cli/tests/snapshots/main_commands_check/check_json_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/check_json_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_json_analyze/tests/specs/suspicious/noDuplicateObjectKeys/invalid.json.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (1)
  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
⏰ 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). (25)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: autofix
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added A-Linter Area: linter L-JSON Language: JSON and super languages labels Aug 24, 2025
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

🧹 Nitpick comments (1)
crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs (1)

86-86: Optional wording tweak: prefer “duplicate key” over “duplicated key”.

Minor style polish for consistency and brevity.

Apply this diff if you agree:

-                    "This is where a duplicated key was declared again."
+                    "This is where the duplicate key was declared again."
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f9636d5 and f47ba07.

⛔ Files ignored due to path filters (1)
  • crates/biome_json_analyze/tests/specs/suspicious/noDuplicateObjectKeys/invalid.json.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (1)
  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Format Rust and TOML files before committing (use just f/just format).

Files:

  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
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_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
🧠 Learnings (1)
📚 Learning: 2025-08-11T11:46:05.836Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:46:05.836Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Most diagnostic attributes may be specified only once (either on the type or a single field); #[advice] and #[verbose_advice] may appear multiple times and are recorded in declaration order

Applied to files:

  • crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
⏰ 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). (24)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
🔇 Additional comments (2)
crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs (2)

86-86: Grammar fix LGTM.

The insertion of “is” corrects the message and reads naturally. Thanks for tightening up a user‑facing string.


72-95: Phrase consistency confirmed
I ran a repo-wide search and only the “duplicated key” phrasing appears in this lint, with no instances of “duplicate key” elsewhere. No changes needed—feel free to keep the message as-is.

…tic message

Fixed missing 'is' in the diagnostic message for the noDuplicateObjectKeys rule when applied to JSON files. The message now correctly reads 'This is where a duplicated key was declared again.' instead of 'This where a duplicated key was declared again.'

Fixes biomejs#7307
@JeetuSuthar JeetuSuthar force-pushed the fix-grammar-duplicate-object-keys branch from f47ba07 to 673d5b2 Compare August 24, 2025 17:32
@github-actions github-actions bot added the A-CLI Area: CLI label Aug 24, 2025
Copy link

codspeed-hq bot commented Aug 24, 2025

CodSpeed Performance Report

Merging #7317 will not alter performance

Comparing JeetuSuthar:fix-grammar-duplicate-object-keys (8447596) with main (f9636d5)

Summary

✅ 133 untouched benchmarks

Copy link
Member

Choose a reason for hiding this comment

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

you can delete this file, I think this fix doesn't need changelog

Copy link

changeset-bot bot commented Aug 24, 2025

⚠️ No Changeset found

Latest commit: 8447596

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

@JeetuSuthar
Copy link
Contributor Author

@unvalley Ya ! removed the changeast file

@ematipico ematipico merged commit f05258a into biomejs:main Aug 24, 2025
29 checks passed
ematipico pushed a commit that referenced this pull request Aug 26, 2025
SkyBird233 pushed a commit to SkyBird233/biomejs that referenced this pull request Aug 28, 2025
SkyBird233 pushed a commit to SkyBird233/biomejs that referenced this pull request Aug 28, 2025
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-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💅 lint/suspicious/noDuplicateObjectKeys has grammatically incorrect information message for JSON

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载