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

Skip to content

Conversation

@Jayllyz
Copy link
Contributor

@Jayllyz Jayllyz commented Nov 13, 2025

Summary

Closes #8008

Test Plan

Manually tested the schema as shown in the issue comment.

Docs

@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2025

πŸ¦‹ Changeset detected

Latest commit: f0b0e7d

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-Project Area: project A-Tooling Area: internal tools labels Nov 13, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 13, 2025

CodSpeed Performance Report

Merging #8098 will not alter performance

Comparing Jayllyz:feat/schema-rule-description (f0b0e7d) with main (6f5b876)

Summary

βœ… 1 untouched
⏩ 154 skipped1

Footnotes

  1. 154 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@Jayllyz Jayllyz marked this pull request as ready for review November 13, 2025 20:39
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

This PR enriches rule descriptions in the JSON schema by appending documentation URLs. The code generation logic now converts rule names to kebab-case and generates kind-specific URLs: assist actions receive /assist/actions/{rule} links whilst lint rules receive /linter/rules/{rule} links. Documentation strings are conditionally formattedβ€”existing docs are preserved with a period and "See {url}" appended, whilst empty docs simply output the URL reference. Manual documentation updates to the Source struct fields mirror this URL addition.

Possibly related PRs

Suggested labels

A-Linter, L-JSON

Suggested reviewers

  • ematipico
  • dyc3

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title 'feat(schema): add docs URLs to rule description' directly and clearly summarises the main changeβ€”adding documentation URLs to rule descriptions in the JSON schema.
Description check βœ… Passed The PR description is related to the changeset, referencing issue #8008, the schema documentation URL enhancement, and a test plan showing manual validation.
Linked Issues check βœ… Passed The PR fully addresses issue #8008 requirements: URLs are appended to rule descriptions in the JSON schema using the format '. See ' for both lint and assist rules.
Out of Scope Changes check βœ… Passed All changes are scoped to the linked issue: the changeset file documents the release, configuration assists are documented with URLs, and code generation logic adds rule URLs to descriptions as required.
✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

πŸ“œ Recent 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 6f5b876 and f0b0e7d.

β›” Files ignored due to path filters (3)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
πŸ“’ Files selected for processing (3)
  • .changeset/late-trains-start.md (1 hunks)
  • crates/biome_configuration/src/analyzer/assist/actions.rs (1 hunks)
  • xtask/codegen/src/generate_configuration.rs (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
πŸ““ Common learnings
Learnt from: ematipico
Repo: biomejs/biome PR: 7856
File: .changeset/yellow-crews-guess.md:1-5
Timestamp: 2025-10-25T07:02:26.457Z
Learning: The Biome documentation website uses kebab-case URL slugs for rule pages (e.g., `/linter/rules/no-continue/`), not camelCase.
πŸ“š Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • .changeset/late-trains-start.md
πŸ“š Learning: 2025-10-25T07:02:26.457Z
Learnt from: ematipico
Repo: biomejs/biome PR: 7856
File: .changeset/yellow-crews-guess.md:1-5
Timestamp: 2025-10-25T07:02:26.457Z
Learning: The Biome documentation website uses kebab-case URL slugs for rule pages (e.g., `/linter/rules/no-continue/`), not camelCase.

Applied to files:

  • .changeset/late-trains-start.md
  • xtask/codegen/src/generate_configuration.rs
πŸ”‡ Additional comments (3)
crates/biome_configuration/src/analyzer/assist/actions.rs (1)

184-206: LGTM! Documentation URLs properly generated.

The generated documentation correctly appends URLs in kebab-case format for all assist actions. This aligns with the learnings about Biome's documentation URL structure.

Based on learnings

xtask/codegen/src/generate_configuration.rs (1)

892-905: Excellent implementation of URL enrichment.

The logic correctly converts rule names to kebab-case and generates appropriate URLs based on rule category. The conditional formatting handles both empty and populated documentation gracefully, and trim_end_matches('.') prevents awkward double periods.

Based on learnings

.changeset/late-trains-start.md (1)

1-5: LGTM! Changeset properly documents the enhancement.

The patch-level version bump is appropriate for this documentation improvement, and the description clearly explains the change.


Comment @coderabbitai help to get the list of available commands and usage tips.

@dyc3 dyc3 merged commit 1fdcaf0 into biomejs:main Nov 13, 2025
17 checks passed
@Jayllyz Jayllyz deleted the feat/schema-rule-description branch November 13, 2025 20:57
@github-actions github-actions bot mentioned this pull request Nov 13, 2025
ematipico pushed a commit to hamirmahal/biome that referenced this pull request Nov 19, 2025
l0ngvh pushed a commit to l0ngvh/biome that referenced this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Project Area: project A-Tooling Area: internal tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ“Ž Rule link in schema description

2 participants