Documentation
¶
Overview ¶
Package audit reports conventional-commit and prose-restraint findings over a branch's git history. Range rules are advisory; the shared CheckConventionalCommit rule is also consumed at commit time by the repository commit hook. The uncommitted-changes rule additionally inspects the live working tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConventionalCommitDocument ¶ added in v0.30.0
func ConventionalCommitDocument(findings []Finding) (presentation.Document, error)
ConventionalCommitDocument maps conventional-commit findings for the commit gate.
Types ¶
type Finding ¶
type Finding struct {
Severity severity.Rank
Rule string
Commit string // short hash, "" for a branch-level finding
Subject string
Detail string
}
Finding is one reported conformance issue.
func CheckConventionalCommit ¶ added in v0.3.0
CheckConventionalCommit validates one commit's subject against the Conventional Commits settings and returns any violations. Merge commits are exempt.
type Inputs ¶
type Inputs struct {
Settings
GeneratedPaths map[string]bool
DocsDir string // e.g. "docs", the authored-prose root
}
Inputs are the resolved audit settings plus the generated and prose paths the retained range rules need.
type Outcome ¶ added in v0.40.0
type Outcome struct {
Report presentation.Report
Failed bool
Commits int
}
Outcome is the configured audit result for command rendering and exit mapping.