S027

SchemasStandard

check for Schema of Computed only with Default configured

The S027 analyzer reports cases of schemas which enables only Computed and configures Default, which is not valid.

Examples

&schema.Schema{
    Computed: true,
    Default:  "example",
}
&schema.Schema{
    Computed: true,
}

Ignoring reports

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

//lintignore:S027
&schema.Schema{
    Computed: true,
    Default:  "example",
}

This page is generated from passes/S027/README.md, which lives beside the analyzer.