S029

SchemasStandard

check for Schema of Computed only with ExactlyOneOf configured

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

Examples

&schema.Schema{
    Computed:     true,
    ExactlyOneOf: []string{"example"},
}
&schema.Schema{
    Computed: true,
}

Ignoring reports

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

//lintignore:S029
&schema.Schema{
    Computed:     true,
    ExactlyOneOf: []string{"example"},
}

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