chore: stop tracking generated rule and diagnostic reference pages#11326
Merged
timotheeguerin merged 1 commit intoJul 21, 2026
Merged
Conversation
Since tspd generates one reference page per linter rule and diagnostic from each definition's `docs` field, the generated pages under the website content duplicated their source markdown (`packages/*/src/rules/*.md` and `packages/*/src/diagnostics/*.md`). Gitignore the generated pages and stop tracking them, following the existing `js-api` precedent — they are regenerated during the website build (`build:web` runs `regen-all-packages-docs` before `astro build`). The source markdown remains the single tracked copy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: de8537de-5e61-4a0d-b2de-59ec12c15dc4
tadelesh
requested review from
bterlson,
catalinaperalta,
iscai-msft,
markcowl,
timotheeguerin and
witemple-msft
as code owners
July 21, 2026 02:59
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
timotheeguerin
approved these changes
Jul 21, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 21, 2026
timotheeguerin
deleted the
tadelesh/gitignore-generated-rule-diagnostic-docs
branch
July 21, 2026 11:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since tspd generates one reference page per linter rule and diagnostic from each definition's
docsfield, the generated pages checked into the website content duplicate their source markdown:website/.../libraries/http/rules/op-reference-container-route.md↔packages/http/src/rules/op-reference-container-route.mdwebsite/.../emitters/openapi3/reference/diagnostics/*.md(6 files) ↔packages/openapi3/src/diagnostics/*.mdKeeping both copies in git means every content edit has to be made (or regenerated) in two places.
Fix
Follow the same approach as Azure/typespec-azure#4968 and the repo's existing
js-apiprecedent (**/docs/**/js-api/is already gitignored): stop tracking the generated pages and regenerate them during the website build..gitignore— ignore the generated pages:website/src/content/docs/docs/**/rules/website/src/content/docs/docs/**/reference/diagnostics/packages/*/src/**remains the single tracked copy).The website build regenerates them:
websitebuild runsbuild:web, which runsregen-all-packages-docsbeforeastro check/astro build.Validation
regen-docsfor http + openapi3, and confirmed all 7 pages are reproduced at the same paths — and git now treats them as ignored (no longer tracked, not shown as untracked).@typespec/http(rules) and@typespec/openapi3(diagnostics) are the only libraries in this repo that use thedocsfield, so the globs only match generated content.chronus verifypasses (no shipped package changes).