lintcli

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, opts Options) error

Types

type Contracts

type Contracts struct {
	SupportedVersion string   `json:"supportedVersion"`
	SupportedModes   []string `json:"supportedModes"`
	TopLevelModes    []string `json:"topLevelModes"`
	ImportRule       string   `json:"importRule"`
	InvariantNotes   []string `json:"invariantNotes"`
}

type Finding

type Finding struct {
	Severity string `json:"severity"`
	Code     string `json:"code"`
	Message  string `json:"message"`
	Hint     string `json:"hint,omitempty"`
	Path     string `json:"path,omitempty"`
	Phase    string `json:"phase,omitempty"`
	StepID   string `json:"stepId,omitempty"`
	Kind     string `json:"kind,omitempty"`
}

type Options

type Options struct {
	Root            string
	File            string
	Scenario        string
	Output          string
	VarsFiles       []string
	Verbosef        func(level int, format string, args ...any) error
	StdoutPrintf    func(format string, args ...any) error
	JSONEncoderFunc func() *json.Encoder
	WorkflowRootDir string
	ScenarioDirName string
}

type Report

type Report struct {
	Status     string    `json:"status"`
	Mode       string    `json:"mode"`
	Root       string    `json:"root,omitempty"`
	Entrypoint string    `json:"entrypoint,omitempty"`
	Scenario   string    `json:"scenario,omitempty"`
	Workflows  []string  `json:"workflows"`
	Summary    Summary   `json:"summary"`
	Contracts  Contracts `json:"contracts"`
	Findings   []Finding `json:"findings"`
}

func BuildReport

func BuildReport(ctx context.Context, opts Options) (Report, error)

type Summary

type Summary struct {
	WorkflowCount int `json:"workflowCount"`
	WarningCount  int `json:"warningCount"`
	ErrorCount    int `json:"errorCount"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL