noop

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissedSetup = errors.New("setup was not called first")

ErrMissedSetup is returned when a linter wasn't setup before running or cleaning up

Functions

This section is empty.

Types

type LintNoop

type LintNoop struct {
	Type string `json:"type" yaml:"type" jsonschema:"a linter type to do nothing"`
	// contains filtered or unexported fields
}

LintNoop performs no operations, as a template implementation of cries' linter.Linter

func WithErr added in v0.20.12

func WithErr(setupErr error, runErr error) *LintNoop

WithErr creates a new LintNoop with the given errors

func WithSleep added in v1.0.6

func WithSleep(lint, setup time.Duration) *LintNoop

WithSleep creates a new LintNoop with the given sleep duration - useful for

func (*LintNoop) Cleanup

func (l *LintNoop) Cleanup(ctx context.Context) error

Cleanup removes any additional resources created in the process

func (*LintNoop) Name

func (l *LintNoop) Name() string

Name returns the name of the linter

func (*LintNoop) Run

func (l *LintNoop) Run(filepath string) linter.Report

Run will just return the configured error as a report

func (*LintNoop) Setup added in v1.0.6

func (l *LintNoop) Setup(ctx context.Context) error

Setup just returns the configured error

Jump to

Keyboard shortcuts

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