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

golangci-lint update 1.61.0 #53

Merged
merged 1 commit into from
Oct 26, 2024
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/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.20
go-version: 1.22
id: go

- name: Check out code into the Go module directory
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.22'
- uses: actions/checkout@v3
- run: |
go mod tidy
Expand All @@ -60,7 +60,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.22'
- uses: actions/checkout@v3
- run: |
dnf -y install make gcc glib2-devel glibc-static golang
Expand All @@ -72,10 +72,10 @@ jobs:
name: Unit test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.20
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.20
go-version: 1.22
id: go

- name: Check out code into the Go module directory
Expand Down
14 changes: 3 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@ linters:
- exhaustruct
- tagliatelle
# deprecated
- varcheck
- deadcode
- ifshort
- nosnakecase
- structcheck
- rowserrcheck
- structcheck
- wastedassign
- scopelint
- maligned
- interfacer
- exhaustivestruct
- golint
- execinquery
- exportloopref
- gomnd
linters-settings:
errcheck:
check-blank: false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install.tools: .install.pre-commit .install.codespell .install.golangci-lint .in

.PHONY: .install.golangci-lint
.install.golangci-lint:
VERSION=1.56.2 ./hack/install_golangci.sh
VERSION=1.61.0 ./hack/install_golangci.sh

.PHONY: .install.sphinx-build
.install.sphinx-build:
Expand Down
6 changes: 3 additions & 3 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewConnection(ctx context.Context, username string, password string) (conte
}

dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) { //nolint:revive
return net.Dial("tcp", _url.Host) //nolint:wrapcheck
return net.Dial("tcp", _url.Host)
}

connection.client = &http.Client{
Expand Down Expand Up @@ -100,11 +100,11 @@ func (h *apiResponse) isInformational() bool {
}

func (h *apiResponse) isSuccess() bool {
return h.Response.StatusCode/100 == 2 //nolint:gomnd
return h.Response.StatusCode/100 == 2 //nolint:mnd
}

func (h *apiResponse) isRedirection() bool {
return h.Response.StatusCode/100 == 3 //nolint:gomnd
return h.Response.StatusCode/100 == 3 //nolint:mnd
}

// process drains the response body, and processes the HTTP status code
Expand Down
Loading