Documentation ¶ Index ¶ func RunRules(ctx *Context, f *ast.File, rules *GoRuleSet) error type Context type GoRuleInfo type GoRuleSet func MergeRuleSets(toMerge []*GoRuleSet) *GoRuleSet func ParseRules(filename string, fset *token.FileSet, r io.Reader) (*GoRuleSet, error) type Suggestion Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func RunRules ¶ func RunRules(ctx *Context, f *ast.File, rules *GoRuleSet) error Types ¶ type Context ¶ type Context struct { Debug string DebugPrint func(string) Types *types.Info Sizes types.Sizes Fset *token.FileSet Report func(rule GoRuleInfo, n ast.Node, msg string, s *Suggestion) Pkg *types.Package } type GoRuleInfo ¶ added in v0.1.4 type GoRuleInfo struct { // Filename is a file that defined this rule. Filename string // Line is a line inside a file that defined this rule. Line int // Group is a function name that contained this rule. Group string } type GoRuleSet ¶ type GoRuleSet struct { // contains filtered or unexported fields } func MergeRuleSets ¶ added in v0.1.4 func MergeRuleSets(toMerge []*GoRuleSet) *GoRuleSet func ParseRules ¶ func ParseRules(filename string, fset *token.FileSet, r io.Reader) (*GoRuleSet, error) type Suggestion ¶ type Suggestion struct { From token.Pos To token.Pos Replacement []byte } Source Files ¶ View all Source files dsl_importer.go gorule.go merge.go node_category.go parser.go ruleguard.go runner.go utils.go Directories ¶ Show internal Collapse all Path Synopsis typematch Click to show internal directories. Click to hide internal directories.