Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a scipt to sync linter deps before running lint #3201

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Sep 12, 2022

Summary

Our custom linter is run by golangci-lint as a Go plugin. Go plugins must be built with the exact same version of Go, and the exact same version of all shared Go modules.

make lint will fail if someone updates golangci-lint on their local machine. This PR addresses the problem by adding a command to update the go.mod of the querylinter module based on the modules used by their local golangci-lint.

Usage:

From the internal/tools/querylinter directory, run

go run ./sync/sync-mod.go

@dnephin dnephin force-pushed the dnephin/manage-linter-deps branch 3 times, most recently from 584823e to 1b6a288 Compare September 13, 2022 16:12
@dnephin
Copy link
Contributor Author

dnephin commented Sep 13, 2022

I amended the commit to have the script run go mod tidy.

We didn't notice it in the other PR because our tests now long run when specific files match. I'm going to fix the file filter in another PR.

@dnephin dnephin merged commit 6fd61dc into main Sep 13, 2022
@dnephin dnephin deleted the dnephin/manage-linter-deps branch September 13, 2022 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants