You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to add a linter to golangci-lint, we need to add tests. However, the error format is different between the analysistest package and golangci-lint, so we have to change it. If same error format, we can reuse the test cases by simply copying test files.
golangci-lint test error format
http.Get(url) // ERROR "net/http.Get must not be called"
sayboras
changed the title
Supports analysis package error format in golagnci-lint test
Supports analysis package error format in golangci-lint test
Jul 10, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In order to add a linter to golangci-lint, we need to add tests. However, the error format is different between the analysistest package and golangci-lint, so we have to change it. If same error format, we can reuse the test cases by simply copying test files.
golangci-lint test error format
analysistest package error format
https://godoc.org/golang.org/x/tools/go/analysis/analysistest#Run
Is there any reason for the different error formats?
The text was updated successfully, but these errors were encountered: