cli

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 12 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

Group Reports by Directory

func GroupByDouble

func GroupByDouble(reports []reporter.Report, groupBy []string) (map[string]map[string][]reporter.Report, error)

Group Reports for two groupings

func GroupByErrorType

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

Group Reports by Error Type (syntax, schema, or passed)

func GroupByFileType

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

Group Reports by File Type

func GroupByPassFail

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

Group Reports by Pass-Fail

func GroupBySingle

func GroupBySingle(reports []reporter.Report, groupBy string) (map[string][]reporter.Report, error)

Group Reports by single grouping

func GroupByTriple

func GroupByTriple(reports []reporter.Report, groupBy []string) (map[string]map[string]map[string][]reporter.Report, error)

Group Reports for three groupings

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 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