Skip to content

[feat] doccov: config-accessor group (opt-in) + doc-coverage-file input#8

Merged
vt128 merged 1 commit into
masterfrom
feat/doccov-config-group
Jun 15, 2026
Merged

[feat] doccov: config-accessor group (opt-in) + doc-coverage-file input#8
vt128 merged 1 commit into
masterfrom
feat/doccov-config-group

Conversation

@vt128

@vt128 vt128 commented Jun 15, 2026

Copy link
Copy Markdown
Member

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.

  • -config flag (default OFF, backward-compatible): when set, doccov derives get_<key>/set_<key> from the configKey<X> = "<name>" constants + gen[Secret]ConfigOption(configKey<X>, …) declarations. A declaration line containing "Secret" (genSecretConfigOption or 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 inputs doc-coverage-file (default README.mddoccov -readme) and doc-coverage-config (default falsedoccov -config).
  • Tests + READMEs updated.

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 -config off by default, merging is a no-op for existing callers; the per-module doc-split PRs enable it once docs/API.md documents the accessors.

Validation

Against real modules: gum → 8 accessors (all get_+set_); mq/email/s3 secrets (connection_string, resend_api_key, …) correctly get set_ only. go test -race ./doccov/ green.

🤖 Generated with Claude Code

…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>
@vt128 vt128 merged commit 1e4f392 into master Jun 15, 2026
10 checks passed
@vt128 vt128 deleted the feat/doccov-config-group branch June 15, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant