S033

SchemasStandard

check for Schema of Computed only with StateFunc configured

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

Examples

&schema.Schema{
    Computed: true,
    DefaultFunc: /* ... */,
}
&schema.Schema{
    Computed: true,
}

Ignoring reports

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

//lintignore:S033
&schema.Schema{
    Computed: true,
    DefaultFunc: /* ... */,
}

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