analyzers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(inspectFunc InspectFunc) func(pass *analysis.Pass) (interface{}, error)

Analyze generates a `run` function for a linter, based on a simple template: it does filtering based on configured glob patterns; it collects import aliases and sends it as a linter function param it collects reports from a linter function and checks them against nolint rules

Types

type InspectFunc

type InspectFunc func(n ast.Node, importAliases map[string]string, lastPos token.Pos) []reports.Report

InspectFunc core logic of the linter, acts on an ast.Node, traversed depth-first returns possible lint violations, that will be further inspected for nolint rules

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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