Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLintFailed = errors.New("lint errors found")
ErrLintFailed is returned when checks ran successfully but found errors.
View Source
var Revision = "HEAD"
View Source
var Version = "dev"
Functions ¶
Types ¶
type CLI ¶
type CLI struct {
Dirs []string `arg:"" optional:"" help:"Directories to check (default: terraform/)."`
Verbose bool `name:"verbose" short:"v" help:"Verbose output (show OK results)."`
Quiet bool `name:"quiet" short:"q" help:"Quiet mode (errors only, no progress)."`
JSON bool `name:"json" help:"Output results as JSON to stdout."`
Version VersionFlag `name:"version" help:"Show version."`
}
type CheckError ¶
CheckError represents a single lint error.
type CheckResult ¶
type CheckResult struct {
Checked int `json:"checked"`
Errors []CheckError `json:"errors"`
}
CheckResult holds results for a single check.
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker holds the precomputed data and runs the checks.
func NewChecker ¶
NewChecker creates a new Checker.
type Result ¶
type Result struct {
Dirs []string `json:"dirs"`
Errors []CheckError `json:"errors"`
StateExistence *CheckResult `json:"state_existence,omitempty"`
OutputReference *CheckResult `json:"output_reference,omitempty"`
}
Result is the top-level output structure.
type UsageError ¶
type UsageError struct {
// contains filtered or unexported fields
}
UsageError indicates the tool was invoked incorrectly (exit code 2).
func NewUsageError ¶
func NewUsageError(err error) *UsageError
func (*UsageError) Error ¶
func (e *UsageError) Error() string
func (*UsageError) Unwrap ¶
func (e *UsageError) Unwrap() error
type VersionFlag ¶
type VersionFlag string
func (VersionFlag) BeforeApply ¶
func (VersionFlag) Decode ¶
func (v VersionFlag) Decode(ctx *kong.DecodeContext) error
func (VersionFlag) IsBool ¶
func (v VersionFlag) IsBool() bool
Click to show internal directories.
Click to hide internal directories.