S006

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: MPL-2.0 Imports: 5 Imported by: 2

README

S006

The S006 analyzer reports cases of TypeMap schemas missing Elem, which currently passes Terraform schema validation, but breaks downstream tools and may be required in the future.

Flagged Code

&schema.Schema{
    Type: schema.TypeMap,
}

Passing Code

&schema.Schema{
    Type: schema.TypeMap,
    Elem: &schema.Schema{Type: schema.TypeString},
}

Ignoring Reports

Singular reports can be ignored by adding the a //lintignore:S006 Go code comment at the end of the offending line or on the line immediately proceding, e.g.

//lintignore:S006
&schema.Schema{
    Type: schema.TypeMap,
}

Documentation

Overview

Package S006 defines an Analyzer that checks for Schema of TypeMap missing Elem

Index

Constants

View Source
const Doc = `` /* 221-byte string literal not displayed */

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: analyzerName,
	Doc:  Doc,
	Requires: []*analysis.Analyzer{
		schemainfo.Analyzer,
		commentignore.Analyzer,
	},
	Run: run,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL