XR002

ResourcesExtra · tfsproutx

check for Resource that should implement Importer

The XR002 analyzer reports missing usage of Importer in resources.

Examples

&schema.Resource{
    Create: /* ... */,
    Delete: /* ... */,
    Read:   /* ... */,
    Schema: /* ... */,
}
&schema.Resource{
    Create:   /* ... */,
    Delete:   /* ... */,
    Importer: &schema.ResourceImporter{/* ... */},
    Read:     /* ... */,
    Schema:   /* ... */,
}

Ignoring reports

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

//lintignore:XR002
&schema.Resource{
    Create: /* ... */,
    Delete: /* ... */,
    Read: /* ... */,
}

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