Documentation
¶
Overview ¶
Package executor is the thing that will execute our rules.
This means processing the rules, one by one, but also ensuring dependencies are handled.
Variable assignments, and the inclusion of files, occur at run-time too, so they are handled here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// Program is the series of AST-nodes we'll interpret.
Program []ast.Node
// contains filtered or unexported fields
}
Executor holds our internal state.
func New ¶
New creates a new executor, using the array of AST nodes we should execute, which was produced by the parser.
func (*Executor) Check ¶
Check ensures the rules make sense.
In short this means that we check the dependencies/notifiers listed for every rule, and raise an error if they contain references to rules which don't exist.
func (*Executor) MarkSeen ¶ added in v0.11.0
MarkSeen marks the given file as having already been seen.
func (*Executor) SetConfig ¶ added in v0.6.0
SetConfig updates the executor with the specified configuration object.
func (*Executor) SetMagicIncludeVars ¶ added in v0.12.0
SetMagicIncludeVars sets magic environment variables.