docs: backfill Go doc comments for exported symbols - #214
Open
iamlasse wants to merge 2 commits into
Open
Conversation
Add internal/commits with pure Normalize/validate functions enforcing the project's Conventional Commits rules (known type set, lowercase type, lowercase subject, 72-char subject limit, whitespace trimming, and 72-column body wrapping). Wire it into the CLI as 'nightshift commit normalize' (positional, --file, and stdin sources; --check to validate only), ship a commit-msg git hook under scripts/, and document the format and installation in docs/commit-messages.md. Nightshift-Task: commit-normalize Nightshift-Ref: https://github.com/marcus/nightshift
Add Go doc comments to every previously-undocumented exported symbol (consts, vars, and command doc) across the codebase. Comments are purely additive and gofmt-aligned; grouped const/var blocks now carry a per-symbol doc comment. Files covered: - cmd/nightshift/commands/install.go (ServiceLaunchd/Systemd/Cron) - cmd/provider-calibration/main.go (package command doc) - internal/config/config.go (Default*, Err*) - internal/integrations/integrations.go (Hint*) - internal/orchestrator/events.go (Event*) - internal/orchestrator/orchestrator.go (DefaultAgentTimeout, Status*) - internal/scheduler/scheduler.go (Err*) - internal/security/audit.go (Audit*) - internal/security/credentials.go (Env*, Err*) - internal/security/security.go (Op*) - internal/setup/presets.go (Preset*) - internal/tasks/tasks.go (Cost*, Risk*, Task*) Verification: gofmt clean, go build ./... and go vet ./... pass, go test ./... passes, and the AST doc-checker reports zero undocumented exported symbols. Nightshift-Task: docs-backfill Nightshift-Ref: https://github.com/marcus/nightshift Co-Authored-By: Claude <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.
Summary
Backfills Go doc comments for every previously-undocumented exported symbol across the codebase, plus a command-level package doc for
provider-calibration. All changes are comment-only and gofmt-aligned.Scope
A repo-wide AST doc-checker (
go/ast) enumerated the authoritative set of undocumented exported symbols. This PR documents all of them, bringing the undocumented-exported count to 0.Package doc
cmd/provider-calibration/main.go— added// Command provider-calibration ...package doc (the only package lacking one).Exported-symbol doc comments (by file)
cmd/nightshift/commands/install.go—ServiceLaunchd,ServiceSystemd,ServiceCroninternal/config/config.go—Default*consts,Err*validation varsinternal/integrations/integrations.go—Hint*constsinternal/orchestrator/events.go—Event*constsinternal/orchestrator/orchestrator.go—DefaultAgentTimeout,DefaultMaxIterations,Status*constsinternal/scheduler/scheduler.go—Err*varsinternal/security/audit.go—Audit*constsinternal/security/credentials.go—Env*consts,Err*varsinternal/security/security.go—Op*constsinternal/setup/presets.go—Preset*constsinternal/tasks/tasks.go—Cost*,Risk*, and allTask*type constsEach grouped
const/varblock now carries a per-symbol doc comment that starts with the symbol's own name, per Go idiom.Verification
gofmt -lcleango build ./...✅go vet ./...✅go test ./...✅ (all packages pass)Nightshift-Task: docs-backfill
Nightshift-Ref: https://github.com/marcus/nightshift
🤖 Generated with Claude Code
Automated by nightshift