S030

SchemasStandard

check for Schema of Computed only with InputDefault configured

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

Examples

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

Ignoring reports

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

//lintignore:S030
&schema.Schema{
    Computed:     true,
    InputDefault: "example",
}

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