Documentation
¶
Index ¶
- func AssertIssues(t *testing.T, expected Issues, actual Issues)
- func AssertIssuesWithoutRange(t *testing.T, expected Issues, actual Issues)
- type Issue
- type Issues
- type Runner
- func (r *Runner) EmitIssue(rule tflint.Rule, message string, location hcl.Range, meta tflint.Metadata) error
- func (r *Runner) EnsureNoError(err error, proc func() error) error
- func (r *Runner) EvaluateExpr(expr hcl.Expression, ret interface{}) error
- func (r *Runner) WalkResourceAttributes(resourceType, attributeName string, walker func(*hcl.Attribute) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertIssues ¶
AssertIssues is an assertion helper for comparing issues
Types ¶
type Issue ¶
Issue is a stub that has the same structure as the actually used issue object. This is only used for testing, as the Runner client doesn't depend on the actual Issue structure.
type Runner ¶
Runner is a pseudo Runner client provided for plugin testing. Actually, it is provided as an RPC client, but for the sake of simplicity, only the methods that satisfy the minimum required Runner interface are implemented. Specifically, there are restrictions on evaluation, annotation comments, module inspection, and so on.
func TestRunner ¶
TestRunner returns a pseudo Runner for testing
func (*Runner) EmitIssue ¶
func (r *Runner) EmitIssue(rule tflint.Rule, message string, location hcl.Range, meta tflint.Metadata) error
EmitIssue adds an issue into the self
func (*Runner) EnsureNoError ¶
EnsureNoError is a method that simply run a function if there is no error
func (*Runner) EvaluateExpr ¶
EvaluateExpr returns a value of the passed expression. Note that there is no evaluation, no type conversion, etc.