processors

package
v1.43.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Less compareResult = iota - 1
	Equal
	Greater
	None
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutogeneratedExclude added in v1.6.1

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

func NewAutogeneratedExclude added in v1.6.1

func NewAutogeneratedExclude() *AutogeneratedExclude

func (AutogeneratedExclude) Finish added in v1.6.1

func (p AutogeneratedExclude) Finish()

func (AutogeneratedExclude) Name added in v1.6.1

func (p AutogeneratedExclude) Name() string

func (*AutogeneratedExclude) Process added in v1.6.1

func (p *AutogeneratedExclude) Process(issues []result.Issue) ([]result.Issue, error)

type BaseRule added in v1.42.2

type BaseRule struct {
	Text    string
	Source  string
	Path    string
	Linters []string
}

type ByColumn added in v1.42.2

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

func (ByColumn) Compare added in v1.42.2

func (cmp ByColumn) Compare(a, b *result.Issue) compareResult

func (ByColumn) Next added in v1.42.2

func (cmp ByColumn) Next() comparator

type ByLine added in v1.42.2

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

func (ByLine) Compare added in v1.42.2

func (cmp ByLine) Compare(a, b *result.Issue) compareResult

func (ByLine) Next added in v1.42.2

func (cmp ByLine) Next() comparator

type ByName added in v1.42.2

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

func (ByName) Compare added in v1.42.2

func (cmp ByName) Compare(a, b *result.Issue) compareResult

func (ByName) Next added in v1.42.2

func (cmp ByName) Next() comparator

type Cgo

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

func NewCgo

func NewCgo(goenv *goutil.Env) *Cgo

func (Cgo) Finish

func (Cgo) Finish()

func (Cgo) Name

func (p Cgo) Name() string

func (Cgo) Process

func (p Cgo) Process(issues []result.Issue) ([]result.Issue, error)

type Diff

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

func NewDiff

func NewDiff(onlyNew bool, fromRev, patchFilePath string, wholeFiles bool) *Diff

func (Diff) Finish

func (Diff) Finish()

func (Diff) Name

func (p Diff) Name() string

func (Diff) Process

func (p Diff) Process(issues []result.Issue) ([]result.Issue, error)

type Exclude

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

func NewExclude

func NewExclude(pattern string) *Exclude

func (Exclude) Finish

func (p Exclude) Finish()

func (Exclude) Name

func (p Exclude) Name() string

func (Exclude) Process

func (p Exclude) Process(issues []result.Issue) ([]result.Issue, error)

type ExcludeCaseSensitive added in v1.42.2

type ExcludeCaseSensitive struct {
	*Exclude
}

func NewExcludeCaseSensitive added in v1.42.2

func NewExcludeCaseSensitive(pattern string) *ExcludeCaseSensitive

func (ExcludeCaseSensitive) Name added in v1.42.2

func (p ExcludeCaseSensitive) Name() string

type ExcludeRule added in v1.42.2

type ExcludeRule struct {
	BaseRule
}

type ExcludeRules added in v1.42.2

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

func NewExcludeRules added in v1.42.2

func NewExcludeRules(rules []ExcludeRule, lineCache *fsutils.LineCache, log logutils.Log) *ExcludeRules

func (ExcludeRules) Finish added in v1.42.2

func (ExcludeRules) Finish()

func (ExcludeRules) Name added in v1.42.2

func (ExcludeRules) Name() string

func (ExcludeRules) Process added in v1.42.2

func (p ExcludeRules) Process(issues []result.Issue) ([]result.Issue, error)

type ExcludeRulesCaseSensitive added in v1.42.2

type ExcludeRulesCaseSensitive struct {
	*ExcludeRules
}

func NewExcludeRulesCaseSensitive added in v1.42.2

func NewExcludeRulesCaseSensitive(rules []ExcludeRule, lineCache *fsutils.LineCache, log logutils.Log) *ExcludeRulesCaseSensitive

func (ExcludeRulesCaseSensitive) Name added in v1.42.2

type FilenameUnadjuster added in v1.42.2

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

FilenameUnadjuster is needed because a lot of linters use fset.Position(f.Pos()) to get filename. And they return adjusted filename (e.g. *.qtpl) for an issue. We need restore real .go filename to properly output it, parse it, etc.

func NewFilenameUnadjuster added in v1.42.2

func NewFilenameUnadjuster(pkgs []*packages.Package, log logutils.Log) *FilenameUnadjuster

func (FilenameUnadjuster) Finish added in v1.42.2

func (FilenameUnadjuster) Finish()

func (FilenameUnadjuster) Name added in v1.42.2

func (p FilenameUnadjuster) Name() string

func (*FilenameUnadjuster) Process added in v1.42.2

func (p *FilenameUnadjuster) Process(issues []result.Issue) ([]result.Issue, error)

type Fixer added in v1.42.2

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

func NewFixer added in v1.42.2

func NewFixer(cfg *config.Config, log logutils.Log, fileCache *fsutils.FileCache) *Fixer

func (Fixer) Process added in v1.42.2

func (f Fixer) Process(issues []result.Issue) []result.Issue

type IdentifierMarker added in v1.42.2

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

func NewIdentifierMarker added in v1.42.2

func NewIdentifierMarker() *IdentifierMarker

func (IdentifierMarker) Finish added in v1.42.2

func (im IdentifierMarker) Finish()

func (IdentifierMarker) Name added in v1.42.2

func (im IdentifierMarker) Name() string

func (IdentifierMarker) Process added in v1.42.2

func (im IdentifierMarker) Process(issues []result.Issue) ([]result.Issue, error)

type MaxFromLinter

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

func NewMaxFromLinter

func NewMaxFromLinter(limit int, log logutils.Log, cfg *config.Config) *MaxFromLinter

func (MaxFromLinter) Finish

func (p MaxFromLinter) Finish()

func (MaxFromLinter) Name

func (p MaxFromLinter) Name() string

func (*MaxFromLinter) Process

func (p *MaxFromLinter) Process(issues []result.Issue) ([]result.Issue, error)

type MaxPerFileFromLinter

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

func NewMaxPerFileFromLinter

func NewMaxPerFileFromLinter(cfg *config.Config) *MaxPerFileFromLinter

func (MaxPerFileFromLinter) Finish

func (p MaxPerFileFromLinter) Finish()

func (MaxPerFileFromLinter) Name

func (p MaxPerFileFromLinter) Name() string

func (*MaxPerFileFromLinter) Process

func (p *MaxPerFileFromLinter) Process(issues []result.Issue) ([]result.Issue, error)

type MaxSameIssues

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

func NewMaxSameIssues

func NewMaxSameIssues(limit int, log logutils.Log, cfg *config.Config) *MaxSameIssues

func (MaxSameIssues) Finish

func (p MaxSameIssues) Finish()

func (MaxSameIssues) Name

func (MaxSameIssues) Name() string

func (*MaxSameIssues) Process

func (p *MaxSameIssues) Process(issues []result.Issue) ([]result.Issue, error)

type Nolint

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

func NewNolint

func NewNolint(log logutils.Log, dbManager *lintersdb.Manager, enabledLinters map[string]*linter.Config) *Nolint

func (Nolint) Finish

func (p Nolint) Finish()

func (Nolint) Name

func (p Nolint) Name() string

func (*Nolint) Process

func (p *Nolint) Process(issues []result.Issue) ([]result.Issue, error)

type PathPrefixer added in v1.42.2

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

PathPrefixer adds a customizable prefix to every output path

func NewPathPrefixer added in v1.42.2

func NewPathPrefixer(prefix string) *PathPrefixer

NewPathPrefixer returns a new path prefixer for the provided string

func (*PathPrefixer) Finish added in v1.42.2

func (*PathPrefixer) Finish()

Finish is implemented to satisfy the Processor interface

func (*PathPrefixer) Name added in v1.42.2

func (*PathPrefixer) Name() string

Name returns the name of this processor

func (*PathPrefixer) Process added in v1.42.2

func (p *PathPrefixer) Process(issues []result.Issue) ([]result.Issue, error)

Process adds the prefix to each path

type PathPrettifier

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

func NewPathPrettifier

func NewPathPrettifier() *PathPrettifier

func (PathPrettifier) Finish

func (p PathPrettifier) Finish()

func (PathPrettifier) Name

func (p PathPrettifier) Name() string

func (PathPrettifier) Process

func (p PathPrettifier) Process(issues []result.Issue) ([]result.Issue, error)

type PathShortener added in v1.42.2

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

func NewPathShortener added in v1.42.2

func NewPathShortener() *PathShortener

func (PathShortener) Finish added in v1.42.2

func (p PathShortener) Finish()

func (PathShortener) Name added in v1.42.2

func (p PathShortener) Name() string

func (PathShortener) Process added in v1.42.2

func (p PathShortener) Process(issues []result.Issue) ([]result.Issue, error)

type Processor

type Processor interface {
	Process(issues []result.Issue) ([]result.Issue, error)
	Name() string
	Finish()
}

type SeverityRule added in v1.42.2

type SeverityRule struct {
	BaseRule
	Severity string
}

type SeverityRules added in v1.42.2

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

func NewSeverityRules added in v1.42.2

func NewSeverityRules(defaultSeverity string, rules []SeverityRule, lineCache *fsutils.LineCache, log logutils.Log) *SeverityRules

func (SeverityRules) Finish added in v1.42.2

func (SeverityRules) Finish()

func (SeverityRules) Name added in v1.42.2

func (SeverityRules) Name() string

func (SeverityRules) Process added in v1.42.2

func (p SeverityRules) Process(issues []result.Issue) ([]result.Issue, error)

type SeverityRulesCaseSensitive added in v1.42.2

type SeverityRulesCaseSensitive struct {
	*SeverityRules
}

func NewSeverityRulesCaseSensitive added in v1.42.2

func NewSeverityRulesCaseSensitive(defaultSeverity string, rules []SeverityRule,
	lineCache *fsutils.LineCache, log logutils.Log) *SeverityRulesCaseSensitive

func (SeverityRulesCaseSensitive) Name added in v1.42.2

type SkipDirs added in v1.42.2

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

func NewSkipDirs added in v1.42.2

func NewSkipDirs(patterns []string, log logutils.Log, runArgs []string) (*SkipDirs, error)

func (*SkipDirs) Finish added in v1.42.2

func (p *SkipDirs) Finish()

func (*SkipDirs) Name added in v1.42.2

func (p *SkipDirs) Name() string

func (*SkipDirs) Process added in v1.42.2

func (p *SkipDirs) Process(issues []result.Issue) ([]result.Issue, error)

type SkipFiles added in v1.6.1

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

func NewSkipFiles added in v1.6.1

func NewSkipFiles(patterns []string) (*SkipFiles, error)

func (SkipFiles) Finish added in v1.6.1

func (p SkipFiles) Finish()

func (SkipFiles) Name added in v1.6.1

func (p SkipFiles) Name() string

func (SkipFiles) Process added in v1.6.1

func (p SkipFiles) Process(issues []result.Issue) ([]result.Issue, error)

type SortResults added in v1.42.2

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

func NewSortResults added in v1.42.2

func NewSortResults(cfg *config.Config) *SortResults

func (SortResults) Finish added in v1.42.2

func (sr SortResults) Finish()

func (SortResults) Name added in v1.42.2

func (sr SortResults) Name() string

func (SortResults) Process added in v1.42.2

func (sr SortResults) Process(issues []result.Issue) ([]result.Issue, error)

Process is performing sorting of the result issues.

type SourceCode added in v1.10.1

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

func NewSourceCode added in v1.10.1

func NewSourceCode(lc *fsutils.LineCache, log logutils.Log) *SourceCode

func (SourceCode) Finish added in v1.10.1

func (p SourceCode) Finish()

func (SourceCode) Name added in v1.10.1

func (p SourceCode) Name() string

func (SourceCode) Process added in v1.10.1

func (p SourceCode) Process(issues []result.Issue) ([]result.Issue, error)

type UniqByLine

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

func NewUniqByLine

func NewUniqByLine(cfg *config.Config) *UniqByLine

func (UniqByLine) Finish

func (p UniqByLine) Finish()

func (UniqByLine) Name

func (p UniqByLine) Name() string

func (*UniqByLine) Process

func (p *UniqByLine) Process(issues []result.Issue) ([]result.Issue, error)

Jump to

Keyboard shortcuts

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