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

lint: Update linter version #4434

Merged
merged 3 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: reviewdog-golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_version: "v1.41.1"
golangci_lint_version: "v1.47.3"
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/v1.41.1
git checkout tags/v1.47.3
CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
./golangci-lint-cgo --version
cd ../../
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ issues:
- ineffective break statement. Did you mean to break out of the outer loop
# revive: irrelevant error about naming
- "var-naming: don't use leading k in Go names"
# staticcheck: we'll keep using ioutil for now
- 'SA1019: "io/ioutil" has been deprecated since Go 1.16'
Comment on lines +65 to +66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


exclude-rules:
# Add all linters here -- Comment this block out for testing linters
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildtools/versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ github.com/algorand/msgp v1.1.52
github.com/algorand/oapi-codegen v1.3.7
github.com/go-swagger/go-swagger v0.25.0
gotest.tools/gotestsum v1.6.4
github.com/golangci/golangci-lint/cmd/golangci-lint v1.41.1
github.com/golangci/golangci-lint/cmd/golangci-lint v1.47.3
4 changes: 2 additions & 2 deletions scripts/travis/codegen_verification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function runGoFmt() {
}

function runGoLint() {
warningCount=$("$GOPATH"/bin/golint $(go list ./... | grep -v /vendor/ | grep -v /test/e2e-go/) | wc -l | tr -d ' ')
warningCount=$("$GOPATH"/bin/golangci-lint -c .golangci.yml | wc -l | tr -d ' ')
if [ "${warningCount}" = "0" ]; then
return 0
fi
Expand All @@ -51,7 +51,7 @@ function runGoLint() {
echo >&2 " make lint"

# run the linter again to output the actual issues
"$GOPATH"/bin/golint $(go list ./... | grep -v /vendor/ | grep -v /test/e2e-go/) >&2
"$GOPATH"/bin/golangci-lint -c .golangci.yml >&2
return 1
}

Expand Down