bflad / tfproviderlint

Terraform Provider Lint Tool
Mozilla Public License 2.0
136 stars 25 forks source link

passes/R006: Add `-package-aliases` flag #239

Closed bflad closed 3 years ago

bflad commented 3 years ago

Certain providers may wish to shim helper/resource functionality to prevent multiple module version issues while upgrading. When using type aliasing for RetryError and method expressions for RetryableError (or a passthrough implementation), the R006 pass cannot be satisfied due to the mismatched package naming of RetryableError. Instead, we can allow callers to declare their alias/shim package paths to additionally ignore reports. The only requirement is that the shimmed method expression or function name must still be RetryableError.