Skip to content

dev: remove some TODO #2743

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

Merged
merged 2 commits into from
Apr 3, 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
3 changes: 1 addition & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17 # TODO(ldez) the binary compiled with go1.17 doesn't work on go1.18
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
# go-version: ${{ env.GO_VERSION }} # TODO(ldez) the binary compiled with go1.17 doesn't work on go1.18
go-version: ${{ env.GO_VERSION }}
- name: lint
uses: golangci/golangci-lint-action@v3.1.0
with:
Expand Down
20 changes: 13 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ linters-settings:
goimports:
local-prefixes: github.com/golangci/golangci-lint
gomnd:
# TODO(ldez) must be rewritten after the v1.44.0 release.
settings:
mnd:
# don't include the "operation" and "assign"
checks: argument,case,condition,return
ignored-numbers: 0,1,2,3
ignored-functions: strings.SplitN
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
ignored-numbers:
- '0'
- '1'
- '2'
- '3'
Comment on lines +43 to +46
Copy link
Member

Choose a reason for hiding this comment

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

Must say a bit confusing that a list of numbers are treated as strings. (Don't mean this PR, saw this is how it's handled upstream but didn't know).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I know, I documented that https://golangci-lint.run/usage/linters/#gomnd.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI it's for the compatibility with the old configuration.

ignored-functions:
- strings.SplitN

govet:
check-shadowing: true
Expand Down