analyzer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var N1Analyzer = &analysis.Analyzer{
	Name: "n1query",
	Doc:  "Checks for potential N+1 query patterns in GORM code (including nested calls)",
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
		buildssa.Analyzer,
	},
}

Functions

func SetConfig

func SetConfig(config *Config)

Types

type Config

type Config struct {
	IgnoreFiles []string
	Verbose     bool
}

func GetConfig

func GetConfig() *Config

type Finding

type Finding struct {
	Pos        token.Pos
	Message    string
	LoopNode   ast.Node
	CallInLoop *ast.CallExpr
}

Jump to

Keyboard shortcuts

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