[feat] doccov: config-accessor group (opt-in) + doc-coverage-file input#8
Merged
Conversation
…coverage-file Extends doccov to validate the base-generated config accessors as their own group, and lets the reusable workflow point doccov at a non-README doc file (for the README + docs/API.md split layout). - doccov: new -config flag (default OFF, backward-compatible). When set, scanConfig derives get_<key>/set_<key> from the configKey* constants + gen[Secret]ConfigOption declarations (a "Secret" declaration line -> set_ only). Reported/gated as a separate "config accessors" group from the script builtins. - go-ci.yml: doc-coverage-file (default README.md) -> doccov -readme; doc-coverage-config (default false) -> doccov -config. Both opt-in so existing callers are unaffected. - Tests: scanConfig (secret nuance) + the -config on/off gate; README docs updated. Validated against real modules: gum 8 accessors (all get_+set_), mq/email/s3 secrets correctly get set_ only. Config check is OFF by default so merging this does not change any current module's gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Prepares the doc tooling for the README + docs/API.md split (task #49): doccov can now check a non-README doc file and validate the
base-generated config accessors as their own group.-configflag (default OFF, backward-compatible): when set, doccov derivesget_<key>/set_<key>from theconfigKey<X> = "<name>"constants +gen[Secret]ConfigOption(configKey<X>, …)declarations. A declaration line containing "Secret" (genSecretConfigOptionor a chained.SetSecret(true)) marks the option secret →set_only. Reported & gated as a separate "config accessors" group so docs keep a distinct Configuration section.go-ci.yml: new opt-in inputsdoc-coverage-file(defaultREADME.md→doccov -readme) anddoc-coverage-config(defaultfalse→doccov -config).Why opt-in matters
The 17 modules run
doccov@master. If config-checking were on by default, merging this would immediately fail every module (accessors are under-documented in the current READMEs). With-configoff by default, merging is a no-op for existing callers; the per-module doc-split PRs enable it oncedocs/API.mddocuments the accessors.Validation
Against real modules: gum → 8 accessors (all
get_+set_); mq/email/s3 secrets (connection_string,resend_api_key, …) correctly getset_only.go test -race ./doccov/green.🤖 Generated with Claude Code