Skip to content

Commit

Permalink
Merge pull request #53 from navidys/golangci_lint_update
Browse files Browse the repository at this point in the history
golangci-lint update 1.61.0
  • Loading branch information
navidys authored Oct 26, 2024
2 parents baedc1b + 757629b commit 77439af
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
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

0 comments on commit 77439af

Please sign in to comment.