forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish Removing
golint
(gomods#1746)
* Set GO111MODULE to auto in golint script– gomods#1743 As mentioned in gomods#1743 the Go modules environment flag is set to `off` in the script which appears to cause a warning message for each module of the codebase that it is "not in GOROOT". Set to `auto` as this allows the same build to be run the original way should someone choose to delete the `go.mod` file from the project root. * Remove redundant code – golint script Go 1.17 ignores `GO111MODULE` and there are no directories in the project root called `mock`. * Replace `golint` with `go vet` `golint` is deprecated (and frozen) replace with the current `go vet`. This reported one issue on `main` branch: ```pkg/stash/with_etcd.go:33:28: loop variable ep captured by func literal``` Fixed loop variable capture with extraction to parameterised anonymous function passed loop variable and passed in to `errgroup.Go` call. * Finish Removing `golint` Removed remaining references to `golint` in dev doc, Makefile, bash scripts, and powershell build scripts. Removed `get_dev_tools.sh` and `get_dev_tools.ps1` as they only install the removed `golint` package.
- Loading branch information
Showing
8 changed files
with
8 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# check_golint.ps1 | ||
# check_govet.ps1 | ||
# Run the linter on everything | ||
|
||
$out = & golint -set_exit_status $(& go list ./...) | ||
$out = & go vet ./... | ||
if ($LastExitCode -ne 0) { | ||
Write-Error $out | ||
} |
This file was deleted.
Oops, something went wrong.