Documentation ¶
Index ¶
- Variables
- func AssertIssues(t *testing.T, expected helper.Issues, actual helper.Issues)
- func AssertIssuesWithoutRange(t *testing.T, expected helper.Issues, actual helper.Issues)
- func ForFiles(runner tflint.Runner, action func(tflint.Runner, *hcl.File) error) error
- func IsHeadMeta(argName string) bool
- func IsTailMeta(argName string) bool
- func PrintSortedAttrTxt(src []byte, attr *hclsyntax.Attribute) (string, bool)
- func RemoveSpaceAndLine(str string) string
- type Arg
- type Args
- type Block
- type HeadMetaArgs
- type NestedBlock
- type NestedBlocks
- type ResourceBlock
- type Section
- type TerraformCountIndexUsageRule
- func (r *TerraformCountIndexUsageRule) Check(runner tflint.Runner) error
- func (r *TerraformCountIndexUsageRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformCountIndexUsageRule) Enabled() bool
- func (r *TerraformCountIndexUsageRule) Name() string
- func (r *TerraformCountIndexUsageRule) Severity() tflint.Severity
- type TerraformHeredocUsageRule
- func (r *TerraformHeredocUsageRule) Check(runner tflint.Runner) error
- func (r *TerraformHeredocUsageRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformHeredocUsageRule) Enabled() bool
- func (r *TerraformHeredocUsageRule) Name() string
- func (r *TerraformHeredocUsageRule) Severity() tflint.Severity
- type TerraformLocalsOrderRule
- type TerraformModuleProviderDeclarationRule
- func (r *TerraformModuleProviderDeclarationRule) Check(runner tflint.Runner) error
- func (r *TerraformModuleProviderDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformModuleProviderDeclarationRule) Enabled() bool
- func (r *TerraformModuleProviderDeclarationRule) Name() string
- func (r *TerraformModuleProviderDeclarationRule) Severity() tflint.Severity
- type TerraformOutputOrderRule
- type TerraformOutputSeparateRule
- type TerraformRequiredProvidersDeclarationRule
- func (r *TerraformRequiredProvidersDeclarationRule) Check(runner tflint.Runner) error
- func (r *TerraformRequiredProvidersDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformRequiredProvidersDeclarationRule) Enabled() bool
- func (r *TerraformRequiredProvidersDeclarationRule) Name() string
- func (r *TerraformRequiredProvidersDeclarationRule) Severity() tflint.Severity
- type TerraformRequiredVersionDeclarationRule
- func (r *TerraformRequiredVersionDeclarationRule) Check(runner tflint.Runner) error
- func (r *TerraformRequiredVersionDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformRequiredVersionDeclarationRule) Enabled() bool
- func (r *TerraformRequiredVersionDeclarationRule) Name() string
- func (r *TerraformRequiredVersionDeclarationRule) Severity() tflint.Severity
- type TerraformResourceDataArgLayoutRule
- func (r *TerraformResourceDataArgLayoutRule) Check(runner tflint.Runner) error
- func (r *TerraformResourceDataArgLayoutRule) Enabled() bool
- func (r *TerraformResourceDataArgLayoutRule) Link() string
- func (r *TerraformResourceDataArgLayoutRule) Name() string
- func (r *TerraformResourceDataArgLayoutRule) Severity() tflint.Severity
- type TerraformSensitiveVariableNoDefaultRule
- func (r *TerraformSensitiveVariableNoDefaultRule) Check(runner tflint.Runner) error
- func (r *TerraformSensitiveVariableNoDefaultRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformSensitiveVariableNoDefaultRule) Enabled() bool
- func (r *TerraformSensitiveVariableNoDefaultRule) Name() string
- func (r *TerraformSensitiveVariableNoDefaultRule) Severity() tflint.Severity
- type TerraformVariableNullableFalseRule
- func (r *TerraformVariableNullableFalseRule) Check(runner tflint.Runner) error
- func (r *TerraformVariableNullableFalseRule) Enabled() bool
- func (r *TerraformVariableNullableFalseRule) Link() string
- func (r *TerraformVariableNullableFalseRule) Name() string
- func (r *TerraformVariableNullableFalseRule) Severity() tflint.Severity
- type TerraformVariableOrderRule
- type TerraformVariableSeparateRule
- func (r *TerraformVariableSeparateRule) Check(runner tflint.Runner) error
- func (r *TerraformVariableSeparateRule) Enabled() bool
- func (r *TerraformVariableSeparateRule) Link() string
- func (r *TerraformVariableSeparateRule) Name() string
- func (r *TerraformVariableSeparateRule) Severity() tflint.Severity
- type TerraformVersionsFileRule
- func (r *TerraformVersionsFileRule) Check(runner tflint.Runner) error
- func (r *TerraformVersionsFileRule) CheckFile(runner tflint.Runner, file *hcl.File) error
- func (r *TerraformVersionsFileRule) Enabled() bool
- func (r *TerraformVersionsFileRule) Name() string
- func (r *TerraformVersionsFileRule) Severity() tflint.Severity
Constants ¶
This section is empty.
Variables ¶
var Rules = []tflint.Rule{ NewTerraformCountIndexUsageRule(), NewTerraformHeredocUsageRule(), NewTerraformLocalsOrderRule(), NewTerraformModuleProviderDeclarationRule(), NewTerraformOutputOrderRule(), NewTerraformOutputSeparateRule(), NewTerraformRequiredProvidersDeclarationRule(), NewTerraformRequiredVersionDeclarationRule(), NewTerraformResourceDataArgLayoutRule(), NewTerraformSensitiveVariableNoDefaultRule(), NewTerraformVariableNullableFalseRule(), NewTerraformVariableOrderRule(), NewTerraformVariableSeparateRule(), NewTerraformVersionsFileRule(), }
Rules is a list of all rules
Functions ¶
func AssertIssues ¶
AssertIssues is an assertion helper for comparing issues.
func AssertIssuesWithoutRange ¶
AssertIssuesWithoutRange is an assertion helper for comparing issues except for range.
func IsHeadMeta ¶
IsHeadMeta checks whether a name represents a type of head Meta arg
func IsTailMeta ¶
IsTailMeta checks whether a name represents a type of tail Meta arg
func PrintSortedAttrTxt ¶
PrintSortedAttrTxt print the sorted hcl text of an attribute
func RemoveSpaceAndLine ¶
RemoveSpaceAndLine remove space, "\t" and "\n" from the given string
Types ¶
type Arg ¶
type Arg struct { Name string Range hcl.Range File *hcl.File }
Arg is a wrapper of the attribute
type Args ¶
type Args struct { Args []*Arg Range *hcl.Range }
Args is the collection of args with the same type
func (*Args) CheckOrder ¶
CheckOrder checks whether this type of args are sorted
type Block ¶
type Block interface { // CheckBlock checks the resourceBlock/nestedBlock recursively to find the block not in order, // and invoke the emit function on that block CheckBlock() error // ToString prints the sorted block ToString() string // DefRange gets the definition range of the block DefRange() hcl.Range }
Block is an interface offering general APIs on resource/nested block
type HeadMetaArgs ¶
type HeadMetaArgs struct { Args []*Arg Range *hcl.Range }
HeadMetaArgs is the collection of head meta args
func (*HeadMetaArgs) CheckOrder ¶
func (a *HeadMetaArgs) CheckOrder() bool
CheckOrder checks whether the head meta args are sorted
func (*HeadMetaArgs) GetRange ¶
func (a *HeadMetaArgs) GetRange() *hcl.Range
GetRange returns the entire range of head meta args
func (*HeadMetaArgs) ToString ¶
func (a *HeadMetaArgs) ToString() string
ToString prints the head meta args in order
type NestedBlock ¶
type NestedBlock struct { File *hcl.File Block *hclsyntax.Block Name string SortField string Range hcl.Range HeadMetaArgs *HeadMetaArgs Args *Args NestedBlocks *NestedBlocks ParentBlockNames []string // contains filtered or unexported fields }
NestedBlock is a wrapper of the nested block
func (*NestedBlock) CheckBlock ¶
func (b *NestedBlock) CheckBlock() error
CheckBlock checks the nestedBlock recursively to find the block not in order, and invoke the emit function on that block
func (*NestedBlock) CheckOrder ¶
func (b *NestedBlock) CheckOrder() bool
CheckOrder checks whether the nestedBlock is sorted
func (*NestedBlock) DefRange ¶
func (b *NestedBlock) DefRange() hcl.Range
DefRange gets the definition range of the nested block
func (*NestedBlock) ToString ¶
func (b *NestedBlock) ToString() string
ToString prints the sorted block
type NestedBlocks ¶
type NestedBlocks struct { Blocks []*NestedBlock Range *hcl.Range }
NestedBlocks is the collection of nestedBlocks with the same type
func (*NestedBlocks) CheckOrder ¶
func (b *NestedBlocks) CheckOrder() bool
CheckOrder checks whether this type of nestedBlocks are sorted
func (*NestedBlocks) GetRange ¶
func (b *NestedBlocks) GetRange() *hcl.Range
GetRange returns the entire range of this type of nestedBlocks
func (*NestedBlocks) ToString ¶
func (b *NestedBlocks) ToString() string
ToString prints this type of nestedBlocks in order
type ResourceBlock ¶
type ResourceBlock struct { File *hcl.File Block *hclsyntax.Block HeadMetaArgs *HeadMetaArgs Args *Args NestedBlocks *NestedBlocks TailMetaArgs *Args TailMetaNestedBlocks *NestedBlocks ParentBlockNames []string // contains filtered or unexported fields }
ResourceBlock is the wrapper of a resource block
func BuildResourceBlock ¶
func BuildResourceBlock(block *hclsyntax.Block, file *hcl.File, emitter func(block Block) error) *ResourceBlock
BuildResourceBlock Build the root block wrapper using hclsyntax.Block
func (*ResourceBlock) CheckBlock ¶
func (b *ResourceBlock) CheckBlock() error
CheckBlock checks the resource block and nested block recursively to find the block not in order, and invoke the emit function on that block
func (*ResourceBlock) CheckOrder ¶
func (b *ResourceBlock) CheckOrder() bool
CheckOrder checks whether the resourceBlock is sorted
func (*ResourceBlock) DefRange ¶
func (b *ResourceBlock) DefRange() hcl.Range
DefRange gets the definition range of the resource block
func (*ResourceBlock) ToString ¶
func (b *ResourceBlock) ToString() string
ToString prints the sorted resource block
type Section ¶
type Section interface { // CheckOrder checks whether the arguments in the collection is sorted CheckOrder() bool // ToString prints arguments in the collection in order ToString() string // GetRange returns the entire range of the argument collection GetRange() *hcl.Range }
Section is an interface offering general APIs of argument collections
type TerraformCountIndexUsageRule ¶
type TerraformCountIndexUsageRule struct {
tflint.DefaultRule
}
TerraformCountIndexUsageRule checks whether count.index is used as subscript of list/map
func NewTerraformCountIndexUsageRule ¶
func NewTerraformCountIndexUsageRule() *TerraformCountIndexUsageRule
NewTerraformCountIndexUsageRule returns a new rule
func (*TerraformCountIndexUsageRule) Check ¶
func (r *TerraformCountIndexUsageRule) Check(runner tflint.Runner) error
func (*TerraformCountIndexUsageRule) CheckFile ¶
func (r *TerraformCountIndexUsageRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformCountIndexUsageRule) Enabled ¶
func (r *TerraformCountIndexUsageRule) Enabled() bool
func (*TerraformCountIndexUsageRule) Name ¶
func (r *TerraformCountIndexUsageRule) Name() string
Name returns the rule name
func (*TerraformCountIndexUsageRule) Severity ¶
func (r *TerraformCountIndexUsageRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformHeredocUsageRule ¶
type TerraformHeredocUsageRule struct {
tflint.DefaultRule
}
TerraformHeredocUsageRule checks whether HEREDOC is used for JSON/YAML
func NewTerraformHeredocUsageRule ¶
func NewTerraformHeredocUsageRule() *TerraformHeredocUsageRule
NewTerraformHeredocUsageRule returns a new rule
func (*TerraformHeredocUsageRule) Check ¶
func (r *TerraformHeredocUsageRule) Check(runner tflint.Runner) error
func (*TerraformHeredocUsageRule) CheckFile ¶
func (r *TerraformHeredocUsageRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformHeredocUsageRule) Enabled ¶
func (r *TerraformHeredocUsageRule) Enabled() bool
func (*TerraformHeredocUsageRule) Name ¶
func (r *TerraformHeredocUsageRule) Name() string
Name returns the rule name
func (*TerraformHeredocUsageRule) Severity ¶
func (r *TerraformHeredocUsageRule) Severity() tflint.Severity
type TerraformLocalsOrderRule ¶
type TerraformLocalsOrderRule struct {
tflint.DefaultRule
}
TerraformLocalsOrderRule checks whether comments use the preferred syntax
func NewTerraformLocalsOrderRule ¶
func NewTerraformLocalsOrderRule() *TerraformLocalsOrderRule
NewTerraformLocalsOrderRule returns a new rule
func (*TerraformLocalsOrderRule) Check ¶
func (r *TerraformLocalsOrderRule) Check(runner tflint.Runner) error
Check checks whether single line comments is used
func (*TerraformLocalsOrderRule) Enabled ¶
func (r *TerraformLocalsOrderRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformLocalsOrderRule) Link ¶
func (r *TerraformLocalsOrderRule) Link() string
Link returns the rule reference link
func (*TerraformLocalsOrderRule) Name ¶
func (r *TerraformLocalsOrderRule) Name() string
Name returns the rule name
func (*TerraformLocalsOrderRule) Severity ¶
func (r *TerraformLocalsOrderRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformModuleProviderDeclarationRule ¶
type TerraformModuleProviderDeclarationRule struct {
tflint.DefaultRule
}
TerraformModuleProviderDeclarationRule checks whether local variables are sorted in alphabetic order
func NewTerraformModuleProviderDeclarationRule ¶
func NewTerraformModuleProviderDeclarationRule() *TerraformModuleProviderDeclarationRule
NewTerraformModuleProviderDeclarationRule returns a new rule
func (*TerraformModuleProviderDeclarationRule) Check ¶
func (r *TerraformModuleProviderDeclarationRule) Check(runner tflint.Runner) error
func (*TerraformModuleProviderDeclarationRule) CheckFile ¶
func (r *TerraformModuleProviderDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformModuleProviderDeclarationRule) Enabled ¶
func (r *TerraformModuleProviderDeclarationRule) Enabled() bool
func (*TerraformModuleProviderDeclarationRule) Name ¶
func (r *TerraformModuleProviderDeclarationRule) Name() string
Name returns the rule name
func (*TerraformModuleProviderDeclarationRule) Severity ¶
func (r *TerraformModuleProviderDeclarationRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformOutputOrderRule ¶
type TerraformOutputOrderRule struct {
tflint.DefaultRule
}
TerraformOutputOrderRule checks whether the outputs are sorted in expected order
func NewTerraformOutputOrderRule ¶
func NewTerraformOutputOrderRule() *TerraformOutputOrderRule
NewTerraformOutputOrderRule returns a new rule
func (*TerraformOutputOrderRule) Check ¶
func (r *TerraformOutputOrderRule) Check(runner tflint.Runner) error
Check checks whether the outputs are sorted in expected order
func (*TerraformOutputOrderRule) Enabled ¶
func (r *TerraformOutputOrderRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformOutputOrderRule) Link ¶
func (r *TerraformOutputOrderRule) Link() string
Link returns the rule reference link
func (*TerraformOutputOrderRule) Name ¶
func (r *TerraformOutputOrderRule) Name() string
Name returns the rule name
func (*TerraformOutputOrderRule) Severity ¶
func (r *TerraformOutputOrderRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformOutputSeparateRule ¶
type TerraformOutputSeparateRule struct {
tflint.DefaultRule
}
TerraformOutputSeparateRule checks whether the outputs are separated from other types of blocks
func NewTerraformOutputSeparateRule ¶
func NewTerraformOutputSeparateRule() *TerraformOutputSeparateRule
NewTerraformOutputSeparateRule returns a new rule
func (*TerraformOutputSeparateRule) Check ¶
func (r *TerraformOutputSeparateRule) Check(runner tflint.Runner) error
Check checks whether the variables are separated from other types of blocks
func (*TerraformOutputSeparateRule) Enabled ¶
func (r *TerraformOutputSeparateRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformOutputSeparateRule) Link ¶
func (r *TerraformOutputSeparateRule) Link() string
Link returns the rule reference link
func (*TerraformOutputSeparateRule) Name ¶
func (r *TerraformOutputSeparateRule) Name() string
Name returns the rule name
func (*TerraformOutputSeparateRule) Severity ¶
func (r *TerraformOutputSeparateRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformRequiredProvidersDeclarationRule ¶
type TerraformRequiredProvidersDeclarationRule struct {
tflint.DefaultRule
}
TerraformRequiredProvidersDeclarationRule checks whether the required_providers block is declared in terraform block and whether the args of it are sorted in alphabetic order
func NewTerraformRequiredProvidersDeclarationRule ¶
func NewTerraformRequiredProvidersDeclarationRule() *TerraformRequiredProvidersDeclarationRule
NewTerraformRequiredProvidersDeclarationRule returns a new rule
func (*TerraformRequiredProvidersDeclarationRule) Check ¶
func (r *TerraformRequiredProvidersDeclarationRule) Check(runner tflint.Runner) error
func (*TerraformRequiredProvidersDeclarationRule) CheckFile ¶
func (r *TerraformRequiredProvidersDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformRequiredProvidersDeclarationRule) Enabled ¶
func (r *TerraformRequiredProvidersDeclarationRule) Enabled() bool
func (*TerraformRequiredProvidersDeclarationRule) Name ¶
func (r *TerraformRequiredProvidersDeclarationRule) Name() string
Name returns the rule name
func (*TerraformRequiredProvidersDeclarationRule) Severity ¶
func (r *TerraformRequiredProvidersDeclarationRule) Severity() tflint.Severity
type TerraformRequiredVersionDeclarationRule ¶
type TerraformRequiredVersionDeclarationRule struct {
tflint.DefaultRule
}
TerraformRequiredVersionDeclarationRule checks whether required_version field is declared at the beginning of terraform block
func NewTerraformRequiredVersionDeclarationRule ¶
func NewTerraformRequiredVersionDeclarationRule() *TerraformRequiredVersionDeclarationRule
NewTerraformRequiredVersionDeclarationRule returns a new rule
func (*TerraformRequiredVersionDeclarationRule) Check ¶
func (r *TerraformRequiredVersionDeclarationRule) Check(runner tflint.Runner) error
func (*TerraformRequiredVersionDeclarationRule) CheckFile ¶
func (r *TerraformRequiredVersionDeclarationRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformRequiredVersionDeclarationRule) Enabled ¶
func (r *TerraformRequiredVersionDeclarationRule) Enabled() bool
func (*TerraformRequiredVersionDeclarationRule) Name ¶
func (r *TerraformRequiredVersionDeclarationRule) Name() string
Name returns the rule name
func (*TerraformRequiredVersionDeclarationRule) Severity ¶
func (r *TerraformRequiredVersionDeclarationRule) Severity() tflint.Severity
type TerraformResourceDataArgLayoutRule ¶
type TerraformResourceDataArgLayoutRule struct {
tflint.DefaultRule
}
func NewTerraformResourceDataArgLayoutRule ¶
func NewTerraformResourceDataArgLayoutRule() *TerraformResourceDataArgLayoutRule
NewTerraformResourceDataArgLayoutRule returns a new rule
func (*TerraformResourceDataArgLayoutRule) Check ¶
func (r *TerraformResourceDataArgLayoutRule) Check(runner tflint.Runner) error
Check checks whether the arguments/attributes in a block are sorted in azure doc Layout
func (*TerraformResourceDataArgLayoutRule) Enabled ¶
func (r *TerraformResourceDataArgLayoutRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformResourceDataArgLayoutRule) Link ¶
func (r *TerraformResourceDataArgLayoutRule) Link() string
Link returns the rule reference link
func (*TerraformResourceDataArgLayoutRule) Name ¶
func (r *TerraformResourceDataArgLayoutRule) Name() string
Name returns the rule name
func (*TerraformResourceDataArgLayoutRule) Severity ¶
func (r *TerraformResourceDataArgLayoutRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformSensitiveVariableNoDefaultRule ¶
type TerraformSensitiveVariableNoDefaultRule struct {
tflint.DefaultRule
}
TerraformSensitiveVariableNoDefaultRule checks whether default value is set for sensitive variables
func NewTerraformSensitiveVariableNoDefaultRule ¶
func NewTerraformSensitiveVariableNoDefaultRule() *TerraformSensitiveVariableNoDefaultRule
NewTerraformSensitiveVariableNoDefaultRule returns a new rule
func (*TerraformSensitiveVariableNoDefaultRule) Check ¶
func (r *TerraformSensitiveVariableNoDefaultRule) Check(runner tflint.Runner) error
func (*TerraformSensitiveVariableNoDefaultRule) CheckFile ¶
func (r *TerraformSensitiveVariableNoDefaultRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformSensitiveVariableNoDefaultRule) Enabled ¶
func (r *TerraformSensitiveVariableNoDefaultRule) Enabled() bool
func (*TerraformSensitiveVariableNoDefaultRule) Name ¶
func (r *TerraformSensitiveVariableNoDefaultRule) Name() string
Name returns the rule name
func (*TerraformSensitiveVariableNoDefaultRule) Severity ¶
func (r *TerraformSensitiveVariableNoDefaultRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformVariableNullableFalseRule ¶
type TerraformVariableNullableFalseRule struct {
tflint.DefaultRule
}
func NewTerraformVariableNullableFalseRule ¶
func NewTerraformVariableNullableFalseRule() *TerraformVariableNullableFalseRule
func (*TerraformVariableNullableFalseRule) Check ¶
func (r *TerraformVariableNullableFalseRule) Check(runner tflint.Runner) error
func (*TerraformVariableNullableFalseRule) Enabled ¶
func (r *TerraformVariableNullableFalseRule) Enabled() bool
func (*TerraformVariableNullableFalseRule) Link ¶
func (r *TerraformVariableNullableFalseRule) Link() string
func (*TerraformVariableNullableFalseRule) Name ¶
func (r *TerraformVariableNullableFalseRule) Name() string
func (*TerraformVariableNullableFalseRule) Severity ¶
func (r *TerraformVariableNullableFalseRule) Severity() tflint.Severity
type TerraformVariableOrderRule ¶
type TerraformVariableOrderRule struct {
tflint.DefaultRule
}
TerraformVariableOrderRule checks whether the variables are sorted in expected order
func NewTerraformVariableOrderRule ¶
func NewTerraformVariableOrderRule() *TerraformVariableOrderRule
NewTerraformVariableOrderRule returns a new rule
func (*TerraformVariableOrderRule) Check ¶
func (r *TerraformVariableOrderRule) Check(runner tflint.Runner) error
Check checks whether the variables are sorted in expected order
func (*TerraformVariableOrderRule) Enabled ¶
func (r *TerraformVariableOrderRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformVariableOrderRule) Link ¶
func (r *TerraformVariableOrderRule) Link() string
Link returns the rule reference link
func (*TerraformVariableOrderRule) Name ¶
func (r *TerraformVariableOrderRule) Name() string
Name returns the rule name
func (*TerraformVariableOrderRule) Severity ¶
func (r *TerraformVariableOrderRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformVariableSeparateRule ¶
type TerraformVariableSeparateRule struct {
tflint.DefaultRule
}
TerraformVariableSeparateRule checks whether the variables are separated from other types of blocks
func NewTerraformVariableSeparateRule ¶
func NewTerraformVariableSeparateRule() *TerraformVariableSeparateRule
NewTerraformVariableSeparateRule returns a new rule
func (*TerraformVariableSeparateRule) Check ¶
func (r *TerraformVariableSeparateRule) Check(runner tflint.Runner) error
Check checks whether the variables are separated from other types of blocks
func (*TerraformVariableSeparateRule) Enabled ¶
func (r *TerraformVariableSeparateRule) Enabled() bool
Enabled returns whether the rule is enabled by default
func (*TerraformVariableSeparateRule) Link ¶
func (r *TerraformVariableSeparateRule) Link() string
Link returns the rule reference link
func (*TerraformVariableSeparateRule) Name ¶
func (r *TerraformVariableSeparateRule) Name() string
Name returns the rule name
func (*TerraformVariableSeparateRule) Severity ¶
func (r *TerraformVariableSeparateRule) Severity() tflint.Severity
Severity returns the rule severity
type TerraformVersionsFileRule ¶
type TerraformVersionsFileRule struct {
tflint.DefaultRule
}
TerraformVersionsFileRule checks whether `versions.tf` only has 1 `terraform` block
func NewTerraformVersionsFileRule ¶
func NewTerraformVersionsFileRule() *TerraformVersionsFileRule
NewTerraformVersionsFileRule returns a new rule
func (*TerraformVersionsFileRule) Check ¶
func (r *TerraformVersionsFileRule) Check(runner tflint.Runner) error
func (*TerraformVersionsFileRule) CheckFile ¶
func (r *TerraformVersionsFileRule) CheckFile(runner tflint.Runner, file *hcl.File) error
func (*TerraformVersionsFileRule) Enabled ¶
func (r *TerraformVersionsFileRule) Enabled() bool
func (*TerraformVersionsFileRule) Name ¶
func (r *TerraformVersionsFileRule) Name() string
Name returns the rule name
func (*TerraformVersionsFileRule) Severity ¶
func (r *TerraformVersionsFileRule) Severity() tflint.Severity
Source Files ¶
- argument.go
- helper.go
- nested_block.go
- provider.go
- resource_block.go
- terraform_count_index_usage.go
- terraform_heredoc_usage.go
- terraform_locals_order.go
- terraform_module_provider_declaration.go
- terraform_output_order.go
- terraform_output_separate.go
- terraform_required_providers_declaration.go
- terraform_required_version_declaration.go
- terraform_resource_data_arg_layout.go
- terraform_sensitive_variable_no_default.go
- terraform_variable_nullable_false.go
- terraform_variable_order.go
- terraform_variable_separate.go
- terraform_versions_file.go
- test_helper.go