Go stdlib package — go/parser. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.ParseDir()NeutralParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, mode Mode) (map[string]*ast.Package, error)
ParseDir calls ParseFile for all files with names ending in ".go" in the
.ParseExpr()NeutralParseExpr(x string) (ast.Expr, error)
ParseExpr is a convenience function for obtaining the AST of an expression x.
.ParseExprFrom()NeutralParseExprFrom(fset *token.FileSet, filename string, src any, mode Mode) (ast.Expr, error)
ParseExprFrom is a convenience function for parsing an expression.
.ParseFile()NeutralParseFile(fset *token.FileSet, filename string, src any, mode Mode) (*ast.File, error)
ParseFile parses the source code of a single Go source file and returns
| FQN | Field | |
|---|---|---|
| go/parser | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # go/parser