exclude

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 10 Imported by: 2

README

exclude

PkgGoDev

exclude excludes reporting or analyzing of analysis.Analyzer.

Documentation

Index

Constants

This section is empty.

Variables

AllFuncs is all functions.

Functions

func All

func All(as []*analysis.Analyzer, fs ...Func) []*analysis.Analyzer

All excludes the analyzers with the functions.

func By

func By(a *analysis.Analyzer, fs ...Func) *analysis.Analyzer

By excludes with the functions.

func FileWithPattern

func FileWithPattern(a *analysis.Analyzer) *analysis.Analyzer

FileWithPattern excludes files which matches the pattern given by exclude flag. Because it excludes only reporting diagnostics, analyzing would be excuted.

func Flags added in v0.2.0

func Flags(args []string, as ...*analysis.Analyzer) (remains []string, _ error)

Flags sets flags which name has "all-exclude" prefix to each analyzers. Flags returns remain arguments including flags which did not set to the analyzers.

func GeneratedFile

func GeneratedFile(a *analysis.Analyzer) *analysis.Analyzer

GeneratedFile excludes auto generated files. Because it excludes only reporting diagnostics, analyzing would be excuted.

func LintIgnoreComment added in v0.2.0

func LintIgnoreComment(a *analysis.Analyzer) *analysis.Analyzer

LintIgnoreComment excludes diagnostics with staticchek style //lint:ignore comment.

func ReportWithFilter

func ReportWithFilter(pass *analysis.Pass, filters ...DiagnosticFilter) func(analysis.Diagnostic)

func TestFile

func TestFile(a *analysis.Analyzer) *analysis.Analyzer

TestFile excludes test files. Because it excludes only reporting diagnostics, analyzing would be excuted.

Types

type DiagnosticFilter

type DiagnosticFilter func(d analysis.Diagnostic) bool

type Func

type Func func(a *analysis.Analyzer) *analysis.Analyzer

Func excludes reporting diagnostics or analyzing.

Jump to

Keyboard shortcuts

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