bflad / tfproviderlint

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

Move analysis testing to Go module support #307

Closed bflad closed 3 months ago

bflad commented 3 months ago

Reference: https://github.com/golang/go/issues/37054

When this Go module was under heavy development, the analysis testing framework in golang.org/x/tools only supported GOPATH based resolution. Subsequently, dependencies were vendored and a vendor symlink was placed in each of the test case directories.

With recent versions of golang.org/x/tools, placing a go.mod in the testdata directory will cause the analysis testing framework to enable Go module support. Only minor import and pathing changes are needed to convert over. Consumers will no longer be burdened with Go module dependencies only needed for testing this Go module.