analyzerutil

package
v0.88.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package analyzerutil provides shared analyzer setup for custom linters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indexes added in v0.87.1

Indexes returns the nolint directive index and the generated-file index for pass. Both indexes are guaranteed to be available for analyzers created with New or NewAtPath, which declare the producing analyzers in Requires.

func New

func New(name, doc string, run func(*analysis.Pass) (any, error)) *analysis.Analyzer

New creates an analyzer with the standard linter dependencies and URL.

func NewAtPath

func NewAtPath(name, doc, packagePath string, run func(*analysis.Pass) (any, error)) *analysis.Analyzer

NewAtPath creates an analyzer with the standard linter dependencies and URL for packagePath.

func Preorder

func Preorder(pass *analysis.Pass, nodeFilter []ast.Node, fn func(ast.Node)) (any, error)

Preorder runs fn for each node matching nodeFilter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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