Repository navigation
test(docgen): fail when a lockfile name is missing from the docs - #496
Merged
Merged
Conversation
pkg/lockfile now keeps its recognized file names in one table (Files) that KindOf and the unknown-lockfile error read. A docgen test asserts every name appears in the MCP skills table and the CI guide, so a new Kind cannot ship undocumented. mcp.md was missing npm-shrinkwrap.json.
Coverage
Go by area
Web by area (lines)
|
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
The hand-written docs that list the lockfiles
oa checkreads (thecheck-lockfilerow indocs/integrations/mcp.md, the lockfile list indocs/integrations/ci.md) are not tied topkg/lockfile. A newlockfile.Kindcan ship without its file names there;mcp.mdalready lackednpm-shrinkwrap.json.Change
pkg/lockfile: the recognized names live in one table;Files()exposes them,KindOfand the unknown-lockfile error read it.cmd/docgen/lockfile_docs_test.go: asserts every name inlockfile.Files()appears in both docs pages.mcp.md: addnpm-shrinkwrap.json.Tests
New
TestLockfileNamesDocumented; removing a name from either page fails it.Checks run
make fmt,golangci-lint run ./cmd/docgen/... ./pkg/lockfile/...,go test -short -race ./cmd/docgen ./pkg/lockfile ./internal/oacli.