Skip to content

Latest commit

 

History

History

S016

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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,
}