XR005

ResourcesExtra · tfsproutx

check for Resource that Description is configured

The XR005 analyzer reports cases of resources where Description is not configured, which is generally useful for providers that wish to automatically generate documentation based on the schema information.

This analyzer automatically ignores schema attribute Elem of type schema.Resource.

Examples

&schema.Resource{
  Read:   /* ... */,
  Schema: map[string]*schema.Schema{/* ... */},
}
&schema.Resource{
  Description: "manages a widget",
  Read:        /* ... */,
  Schema:      map[string]*schema.Schema{/* ... */},
}

Ignoring reports

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

//lintignore:XR005
&schema.Resource{
  Read:   /* ... */,
  Schema: map[string]*schema.Schema{/* ... */},
}

This page is generated from xpasses/XR005/README.md, which lives beside the analyzer.