refactor/doctor: hoist duplicated doc-path and message literals into constants #76
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/doctor-literal-constants"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #67, part of the SonarQube cleanup in #73. Sonar go:S1192 flagged ten repeated literals across internal/doctor, mostly DocRef paths plus four repeated finding messages. New file docref.go holds the four shared doc paths as unexported constants and every plain DocRef use in the package switches to them, anchored refs and single-use paths stay literal. The four repeated messages become constants at the end of their own files. Names carry their file-group prefix because the invariants test requires it. Also folds the go:S1871 duplicate branch in render_human.go renderHeader: ConfigLoaded and default printed the same header, so ConfigLoaded is now an empty case and the shared print follows the switch, output identical for every state and the switch stays exhaustive. Zero output change, no test or golden file touched, all gates pass. 🤖 Generated with Claude Code