rules

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallerFileName

func GetCallerFileName() string

GetCallerFileName returns filename of caller without file extension.

func MatchCallExpr

func MatchCallExpr(ce *ast.CallExpr, pn string, mn string) bool

MatchCallExpr returns true if ce matches package name pn and method name mn.

Types

type NoOsEnv

type NoOsEnv struct {
}

NoOsEnv flags an error if os.Getenv or os.LookupEnv are used.

func NewNoOsEnv

func NewNoOsEnv() *NoOsEnv

NewNoOsEnv creates and returns a NoOsEnv object.

func (*NoOsEnv) Check

func (lr *NoOsEnv) Check(aNode ast.Node, fs *token.FileSet, lrp *checker.Report)

Check verifies there are no calls to os.Getenv or os.LookupEnv

func (*NoOsEnv) GetID

func (lr *NoOsEnv) GetID() string

GetID returns skip_by_issue_rule.

Jump to

Keyboard shortcuts

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