cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// RootDirectory is the target directory to analyze
	RootDirectory string
	// Rules is a list of lints that are applied to the files in `RootDirectory`
	Rules  []analysis.Rule
	Config *config.Config
}

func (*Cli) LintFile

func (c *Cli) LintFile(
	rulesMap map[analysis.Language][]analysis.Rule,
	patternRules map[analysis.Language][]analysis.YmlRule,
	path string,
) ([]*analysis.Issue, error)

func (*Cli) LoadYamlRules

func (c *Cli) LoadYamlRules(ruleDir string) (map[analysis.Language][]analysis.YmlRule, error)

LoadYamlRules reads all the custom rules from the `.globstar/` directory in the project root, or from checkers/ dir for built-in rules

func (*Cli) Run

func (c *Cli) Run() error

func (*Cli) RunLints

func (c *Cli) RunLints(
	patternRules map[analysis.Language][]analysis.YmlRule,
	runBuiltinRules bool,
) error

RunLints goes over all the files in the project and runs the lints for every file encountered

Jump to

Keyboard shortcuts

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