linter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linter

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

Linter stores data to use for linting.

func NewLinter

func NewLinter() Linter

NewLinter creates a new Regal linter.

func (Linter) Lint

func (l Linter) Lint(ctx context.Context, input rules.Input) (report.Report, error)

Lint runs the linter on provided policies.

func (Linter) WithAddedBundle

func (l Linter) WithAddedBundle(b bundle.Bundle) Linter

WithAddedBundle adds a bundle of rules and data to include in evaluation.

func (Linter) WithCustomRules

func (l Linter) WithCustomRules(paths []string) Linter

WithCustomRules adds custom rules for evaluation, from the Rego (and data) files provided at paths.

func (Linter) WithDisableAll

func (l Linter) WithDisableAll(disableAll bool) Linter

WithDisableAll disables all rules when set to true. This overrides configuration provided in file.

func (Linter) WithDisabledCategories

func (l Linter) WithDisabledCategories(disableCategory ...string) Linter

WithDisabledCategories disables provided categories of rules. This overrides configuration provided in file.

func (Linter) WithDisabledRules

func (l Linter) WithDisabledRules(disable ...string) Linter

WithDisabledRules disables provided rules. This overrides configuration provided in file.

func (Linter) WithEnableAll

func (l Linter) WithEnableAll(enableAll bool) Linter

WithEnableAll enables all rules when set to true. This overrides configuration provided in file.

func (Linter) WithEnabledCategories

func (l Linter) WithEnabledCategories(enableCategory ...string) Linter

WithEnabledCategories enables provided categories of rules. This overrides configuration provided in file.

func (Linter) WithEnabledRules

func (l Linter) WithEnabledRules(enable ...string) Linter

WithEnabledRules enables provided rules. This overrides configuration provided in file.

func (Linter) WithUserConfig

func (l Linter) WithUserConfig(config map[string]any) Linter

WithUserConfig provides config overrides set by the user.

Jump to

Keyboard shortcuts

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