golangci-lint icon indicating copy to clipboard operation
golangci-lint copied to clipboard

Disable vcs stamping in go1.18

Open malteehrlen opened this issue 3 years ago • 3 comments

This new go feature breaks go list ./... type commands that run in e.g. monorepos with several go modules but just one git repository. The fix is to run the command explicitly disabling vcs stamping with the flag -buildvcs=false. Since this wont have any effect on the output of the command it is fine to do it indiscriminately.

Alternatively, a way of providing go list flags via the config yaml could be provided, but I dont think that is necessary.

Cheers!

malteehrlen avatar Jul 08 '22 12:07 malteehrlen

Hey, thank you for opening your first Pull Request !

boring-cyborg[bot] avatar Jul 08 '22 12:07 boring-cyborg[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 08 '22 12:07 CLAassistant

I just realized after playing around a bit that having a properly defined go.work file will also solve this issue, and that is probably the better solution. The go.work file is also something new with go 1.18 so I will test it a bit more but if it works well I will close this pr

malte-ehrlen avatar Jul 08 '22 13:07 malte-ehrlen