checkers

package
v0.0.0-...-255d3fe Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiagnosticCategory = "logging"
)

Variables

This section is empty.

Functions

func ExecuteChecker

func ExecuteChecker(c Checker, pass *analysis.Pass, call CallContext, cfg Config)

Types

type CallContext

type CallContext struct {
	Expr      *ast.CallExpr
	Func      *types.Func
	Signature *types.Signature
}

type Checker

type Checker interface {
	FilterExtraArgs(pass *analysis.Pass, keyAndValues []ast.Expr) []ast.Expr
	CheckPrintfLikeSpecifier(pass *analysis.Pass, args []ast.Expr)
}

type Config

type Config struct {
	RequireStringKey bool
	NoPrintfLike     bool
}

type General

type General struct{}

func (General) CheckPrintfLikeSpecifier

func (g General) CheckPrintfLikeSpecifier(pass *analysis.Pass, args []ast.Expr)

func (General) FilterExtraArgs

func (g General) FilterExtraArgs(_ *analysis.Pass, args []ast.Expr) []ast.Expr

type Kitlog

type Kitlog struct {
	General
}

func (Kitlog) FilterExtraArgs

func (k Kitlog) FilterExtraArgs(pass *analysis.Pass, args []ast.Expr) []ast.Expr

type Zap

type Zap struct {
	General
}

func (Zap) FilterExtraArgs

func (z Zap) FilterExtraArgs(pass *analysis.Pass, args []ast.Expr) []ast.Expr

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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