cli

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupByDirectory

func GroupByDirectory(reports []reporter.Report) map[string][]reporter.Report

GroupByDirectory groups reports by containing directory.

func GroupByErrorType

func GroupByErrorType(reports []reporter.Report) map[string][]reporter.Report

GroupByErrorType groups reports by error type.

func GroupByFileType

func GroupByFileType(reports []reporter.Report) map[string][]reporter.Report

GroupByFileType groups reports by file extension.

func GroupByPassFail

func GroupByPassFail(reports []reporter.Report) map[string][]reporter.Report

GroupByPassFail groups reports by pass or fail status.

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI is the main entry point for running config file validation. Use Init with Option functions to configure, then call Run.

func Init

func Init(opts ...Option) *CLI

func (*CLI) Run

func (c *CLI) Run() (int, error)

type GroupNode added in v2.2.2

type GroupNode = reporter.GroupNode

GroupNode aliases the reporter grouping tree used by grouped output.

func GroupBy added in v2.2.2

func GroupBy(reports []reporter.Report, groupBy []string) (*GroupNode, error)

GroupBy groups reports into a recursive tree for any number of grouping levels.

type Option

type Option func(*CLI)

Option configures a CLI instance.

func WithFinder

func WithFinder(f finder.FileFinder) Option

func WithGroupOutput

func WithGroupOutput(groupOutput []string) Option

func WithNoSchema

func WithNoSchema(noSchema bool) Option

func WithQuiet

func WithQuiet(quiet bool) Option

func WithReporters

func WithReporters(r ...reporter.Reporter) Option

func WithRequireSchema

func WithRequireSchema(require bool) Option

func WithSchemaMap

func WithSchemaMap(m map[string]string) Option

func WithSchemaStore

func WithSchemaStore(s *schemastore.Store) Option

func WithStdinData added in v2.2.0

func WithStdinData(data []byte, ft filetype.FileType) Option

Jump to

Keyboard shortcuts

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