filecheck

package
v0.82.10 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "generatedfileindex",
	Doc:              "indexes generated Go source files for gh-aw custom linters",
	ResultType:       reflect.TypeFor[GeneratedIndex](),
	RunDespiteErrors: true,
	Run: func(pass *analysis.Pass) (any, error) {
		return BuildGeneratedIndex(pass), nil
	},
}

Analyzer builds a shared generated-file index once per package so analyzers can reuse it via pass.ResultOf.

Functions

func IsGeneratedFile added in v0.82.10

func IsGeneratedFile(filename string, generated GeneratedIndex) bool

IsGeneratedFile reports whether filename is marked as generated.

func IsTestFile

func IsTestFile(filename string) bool

IsTestFile reports whether filename is a Go test file path.

func ShouldSkipFilename added in v0.82.10

func ShouldSkipFilename(filename string, generated GeneratedIndex) bool

ShouldSkipFilename reports whether filename should be skipped by linters.

Types

type GeneratedIndex added in v0.82.10

type GeneratedIndex map[string]struct{}

GeneratedIndex records generated Go source files by filename.

func BuildGeneratedIndex added in v0.82.10

func BuildGeneratedIndex(pass *analysis.Pass) GeneratedIndex

BuildGeneratedIndex returns the set of generated Go source files in pass.

func Index added in v0.82.10

func Index(pass *analysis.Pass) (GeneratedIndex, error)

Index returns the shared generated-file index for pass.

Jump to

Keyboard shortcuts

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