lint

package
v1.202544.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LINT_REPORT_GROUP_HUMAN   = "rules_lint_human"
	LINT_REPORT_GROUP_MACHINE = "rules_lint_machine"
	LINT_PATCH_GROUP          = "rules_lint_patch"
	LINT_RESULT_REGEX         = ".*AspectRulesLint.*"
	HISTOGRAM_CHARS           = 20
	MAX_FILENAME_WIDTH        = 80
)

Align with rules_lint

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flagSet *pflag.FlagSet)

Types

type Hunk added in v1.202541.2

type Hunk struct {
	Path string
	Span diagnostic.Span
	Body string
}

type LintBEPHandler

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

type LintResult

type LintResult struct {
	Label    string
	Mnemonic string
	ExitCode int
	Report   string
	Patch    []byte
}

type LintResultOutput added in v1.202541.2

type LintResultOutput struct {
	DiagnosticsFile string
	SarifFile       string
}

type LintResultsFileHandler added in v1.202541.2

type LintResultsFileHandler struct {
	ioutils.Streams
}

func (*LintResultsFileHandler) AddFlags added in v1.202541.2

func (handler *LintResultsFileHandler) AddFlags(flags *pflag.FlagSet)

func (*LintResultsFileHandler) Results added in v1.202541.2

func (handler *LintResultsFileHandler) Results(cmd *cobra.Command, results []*LintResult) (err error)

type LintResultsHandler

type LintResultsHandler interface {
	Results(cmd *cobra.Command, results []*LintResult) error
	AddFlags(flags *pflag.FlagSet)
}

type Linter

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

func New

func New(
	streams ioutils.Streams,
	hstreams ioutils.Streams,
	bzl bazel.Bazel,
	resultsHandlers []LintResultsHandler,
) *Linter

func (*Linter) Run

func (runner *Linter) Run(ctx context.Context, cmd *cobra.Command, args []string) error

type OrderedBuildEvent added in v1.202541.2

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

type ResultForLabelAndMnemonic added in v1.202541.2

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

ResultForLabelAndMnemonic aggregates the relevant files we find in the BEP for

Jump to

Keyboard shortcuts

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