Versions in this module Expand all Collapse all v3-unstable v3.0.0 Jan 29, 2019 Changes in this version + const Globals + func ConcatString(n *ast.BinaryExpr) (string, bool) + func FindVarIdentities(n *ast.BinaryExpr, c *Context) ([]*ast.Ident, bool) + func GetCallInfo(n ast.Node, ctx *Context) (string, string, error) + func GetCallObject(n ast.Node, ctx *Context) (*ast.CallExpr, types.Object) + func GetChar(n ast.Node) (byte, error) + func GetFloat(n ast.Node) (float64, error) + func GetImportPath(name string, ctx *Context) (string, bool) + func GetImportedName(path string, ctx *Context) (string, bool) + func GetInt(n ast.Node) (int64, error) + func GetLocation(n ast.Node, ctx *Context) (string, int) + func GetPkgAbsPath(pkgPath string) (string, error) + func GetPkgRelativePath(path string) (string, error) + func GetString(n ast.Node) (string, error) + func Getenv(key, userDefault string) string + func Gopath() []string + func MatchCallByPackage(n ast.Node, c *Context, pkg string, names ...string) (*ast.CallExpr, bool) + func MatchCallByType(n ast.Node, ctx *Context, requiredType string, calls ...string) (*ast.CallExpr, bool) + func MatchCompLit(n ast.Node, ctx *Context, required string) *ast.CompositeLit + func TryResolve(n ast.Node, c *Context) bool + type Analyzer struct + func NewAnalyzer(conf Config, logger *log.Logger) *Analyzer + func (gosec *Analyzer) LoadRules(ruleDefinitions map[string]RuleBuilder) + func (gosec *Analyzer) Process(buildTags []string, packagePaths ...string) error + func (gosec *Analyzer) Report() ([]*Issue, *Metrics) + func (gosec *Analyzer) Reset() + func (gosec *Analyzer) Visit(n ast.Node) ast.Visitor + type CallList map[string]set + func NewCallList() CallList + func (c CallList) Add(selector, ident string) + func (c CallList) AddAll(selector string, idents ...string) + func (c CallList) Contains(selector, ident string) bool + func (c CallList) ContainsCallExpr(n ast.Node, ctx *Context) *ast.CallExpr + type Config map[string]interface + func (c Config) Get(section string) (interface{}, error) + func (c Config) GetGlobal(option string) (string, error) + func (c Config) ReadFrom(r io.Reader) (int64, error) + func (c Config) Set(section string, value interface{}) + func (c Config) SetGlobal(option, value string) + func (c Config) WriteTo(w io.Writer) (int64, error) + func NewConfig() Config + type Context struct + Comments ast.CommentMap + Config map[string]interface{} + FileSet *token.FileSet + Ignores []map[string]bool + Imports *ImportTracker + Info *types.Info + Pkg *types.Package + Root *ast.File + type ImportTracker struct + Aliased map[string]string + Imported map[string]string + InitOnly map[string]bool + func NewImportTracker() *ImportTracker + func (t *ImportTracker) TrackImport(n ast.Node) + func (t *ImportTracker) TrackPackages(pkgs ...*types.Package) + type Issue struct + Code string + Confidence Score + File string + Line string + RuleID string + Severity Score + What string + func NewIssue(ctx *Context, node ast.Node, ruleID, desc string, severity Score, ...) *Issue + type MetaData struct + Confidence Score + ID string + Severity Score + What string + type Metrics struct + NumFiles int + NumFound int + NumLines int + NumNosec int + type Rule interface + ID func() string + Match func(ast.Node, *Context) (*Issue, error) + type RuleBuilder func(id string, c Config) (Rule, []ast.Node) + type RuleSet map[reflect.Type][]Rule + func NewRuleSet() RuleSet + func (r RuleSet) Register(rule Rule, nodes ...ast.Node) + func (r RuleSet) RegisteredFor(n ast.Node) []Rule + type Score int + const High + const Low + const Medium + func (c Score) MarshalJSON() ([]byte, error) + func (c Score) String() string Other modules containing this package gopkg.in/alecthomas/gometalinter.v2 gopkg.in/alecthomas/gometalinter.v3