XR003

ResourcesExtra · tfsproutx

check for Resource that should implement Timeouts

The XR003 analyzer reports missing usage of Timeouts in resources.

Examples

&schema.Resource{
    Create: /* ... */,
    Delete: /* ... */,
    Read:   /* ... */,
    Schema: /* ... */,
}
&schema.Resource{
    Create:   /* ... */,
    Delete:   /* ... */,
    Read:     /* ... */,
    Schema:   /* ... */,
    Timeouts: &schema.ResourceTimeout{/* ... */},
}

Ignoring reports

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

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

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