S016

package
v0.17.0 Latest Latest
Warning

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

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

README

S016

The S016 analyzer reports cases of schemas including Set without TypeSet, which will fail schema validation.

Flagged Code

&schema.Schema{
    Set:  /* ... */,
    Type: schema.TypeList,
}

Passing Code

&schema.Schema{
    Set:  /* ... */,
    Type: schema.TypeSet,
}

Ignoring Reports

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

//lintignore:S016
&schema.Schema{
    Set:  /* ... */,
    Type: schema.TypeList,
}

Documentation

Overview

Package S016 defines an Analyzer that checks for Schema including Set without TypeSet

Index

Constants

View Source
const Doc = `` /* 155-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