S025

SchemasStandard

check for Schema of Computed only with AtLeastOneOf configured

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

Examples

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

Ignoring reports

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

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

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