Documentation
¶
Overview ¶
cmd_docblock.go implements docblock/docstring coverage checking for Go code.
Usage:
core qa docblock # Check current directory core qa docblock ./pkg/... # Check specific packages core qa docblock --threshold=80 # Require 80% coverage
Package qa provides quality assurance workflow commands.
Unlike `core dev` which is about doing work (commit, push, pull), `core qa` is about verifying work (CI status, reviews, issues).
Commands:
- watch: Monitor GitHub Actions after a push, report actionable data
- review: PR review status with actionable next steps
- health: Aggregate CI health across all repos
- issues: Intelligent issue triage
Index ¶
- func AddQACommands(root *cli.Command)
- func RunDocblockCheck(paths []string, threshold float64, verbose, jsonOutput bool) error
- type Author
- type DocblockResult
- type HealthWorkflowRun
- type Issue
- type JobStep
- type MissingDocblock
- type PullRequest
- type RepoHealth
- type Review
- type ReviewRequest
- type ReviewRequests
- type StatusCheckRollup
- type StatusContext
- type WorkflowJob
- type WorkflowRun
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddQACommands ¶
AddQACommands registers the 'qa' command and all subcommands.
Types ¶
type DocblockResult ¶
type DocblockResult struct {
Coverage float64 `json:"coverage"`
Threshold float64 `json:"threshold"`
Total int `json:"total"`
Documented int `json:"documented"`
Missing []MissingDocblock `json:"missing,omitempty"`
Passed bool `json:"passed"`
}
DocblockResult holds the result of a docblock coverage check.
func CheckDocblockCoverage ¶
func CheckDocblockCoverage(patterns []string) (*DocblockResult, error)
CheckDocblockCoverage analyzes Go packages for docblock coverage.
type HealthWorkflowRun ¶
type HealthWorkflowRun struct {
Status string `json:"status"`
Conclusion string `json:"conclusion"`
Name string `json:"name"`
HeadSha string `json:"headSha"`
UpdatedAt string `json:"updatedAt"`
URL string `json:"url"`
}
HealthWorkflowRun represents a GitHub Actions workflow run
type Issue ¶
type Issue struct {
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Body string `json:"body"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Author struct {
Login string `json:"login"`
} `json:"author"`
Assignees struct {
Nodes []struct {
Login string `json:"login"`
} `json:"nodes"`
} `json:"assignees"`
Labels struct {
Nodes []struct {
Name string `json:"name"`
} `json:"nodes"`
} `json:"labels"`
Comments struct {
TotalCount int `json:"totalCount"`
Nodes []struct {
Author struct {
Login string `json:"login"`
} `json:"author"`
CreatedAt time.Time `json:"createdAt"`
} `json:"nodes"`
} `json:"comments"`
URL string `json:"url"`
// Computed fields
RepoName string
Priority int // Lower = higher priority
Category string // "needs_response", "ready", "blocked", "triage"
ActionHint string
}
Issue represents a GitHub issue with triage metadata
type JobStep ¶
type JobStep struct {
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
Number int `json:"number"`
}
JobStep represents a step within a job
type MissingDocblock ¶
type MissingDocblock struct {
File string `json:"file"`
Line int `json:"line"`
Name string `json:"name"`
Kind string `json:"kind"` // func, type, const, var
Reason string `json:"reason,omitempty"`
}
MissingDocblock represents an exported symbol without documentation.
type PullRequest ¶
type PullRequest struct {
Number int `json:"number"`
Title string `json:"title"`
Author Author `json:"author"`
State string `json:"state"`
IsDraft bool `json:"isDraft"`
Mergeable string `json:"mergeable"`
ReviewDecision string `json:"reviewDecision"`
URL string `json:"url"`
HeadRefName string `json:"headRefName"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
ChangedFiles int `json:"changedFiles"`
StatusChecks *StatusCheckRollup `json:"statusCheckRollup"`
ReviewRequests ReviewRequests `json:"reviewRequests"`
Reviews []Review `json:"reviews"`
}
PullRequest represents a GitHub pull request
type RepoHealth ¶
type RepoHealth struct {
Name string
Status string // "passing", "failing", "pending", "no_ci", "disabled"
Message string
URL string
FailingSince string
}
RepoHealth represents the CI health of a single repo
type ReviewRequest ¶
type ReviewRequest struct {
RequestedReviewer Author `json:"requestedReviewer"`
}
ReviewRequest represents a review request
type ReviewRequests ¶
type ReviewRequests struct {
Nodes []ReviewRequest `json:"nodes"`
}
ReviewRequests contains pending review requests
type StatusCheckRollup ¶
type StatusCheckRollup struct {
Contexts []StatusContext `json:"contexts"`
}
StatusCheckRollup contains CI check status
type StatusContext ¶
type StatusContext struct {
State string `json:"state"`
Conclusion string `json:"conclusion"`
Name string `json:"name"`
}
StatusContext represents a single check
type WorkflowJob ¶
type WorkflowJob struct {
ID int64 `json:"databaseId"`
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
URL string `json:"url"`
}
WorkflowJob represents a job within a workflow run
type WorkflowRun ¶
type WorkflowRun struct {
ID int64 `json:"databaseId"`
Name string `json:"name"`
DisplayTitle string `json:"displayTitle"`
Status string `json:"status"`
Conclusion string `json:"conclusion"`
HeadSha string `json:"headSha"`
URL string `json:"url"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
WorkflowRun represents a GitHub Actions workflow run