Skip to content

Latest commit

 

History

History

S019

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

S019

The S019 analyzer reports cases of schemas including Computed: false, Optional: false, or Required: false which are extraneous.

Flagged Code

&schema.Schema{
    Computed: false,
    Optional: true,
}

&schema.Schema{
    Optional: false,
    Required: true,
}

&schema.Schema{
    Computed: true,
    Required: false,
}

Passing Code

&schema.Schema{
    Optional: true,
}

&schema.Schema{
    Required: true,
}

&schema.Schema{
    Computed: true,
}

Ignoring Reports

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

//lintignore:S019
&schema.Schema{
    Computed: false,
    Optional: true,
}