S032

SchemasStandard

check for Schema of Computed only with MinItems configured

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

Examples

&schema.Schema{
    Computed: true,
    MinItems: 1,
}
&schema.Schema{
    Computed: true,
}

Ignoring reports

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

//lintignore:S032
&schema.Schema{
    Computed: true,
    MinItems: 1,
}

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