nopanic

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnalyzerName = "nopanic"
	AnalyzerDoc  = "Reports instances where program is terminated in places other then `main` package."
)
View Source
const (
	FlagAllowPanicMainFunc    = "allow-panic-main-func"
	FlagAllowPanicMainPackage = "allow-panic-main-package"
	FlagAllowExitMainFunc     = "allow-exit-main-func"
	FlagAllowExitMainPackage  = "allow-exit-main-package"
)

Variables

This section is empty.

Functions

func NewAnalyzer

func NewAnalyzer() *analysis.Analyzer

Types

type AnalyzerSettings added in v1.0.1

type AnalyzerSettings struct {
	AllowPanicMainFunc    bool
	AllowPanicMainPackage bool
	AllowExitMainFunc     bool
	AllowExitMainPackage  bool
}

type CallExprCheckFn

type CallExprCheckFn func(ce *ast.CallExpr) string

Jump to

Keyboard shortcuts

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