Skip to content

Commit

Permalink
Merge pull request #363 from cpanato/updates
Browse files Browse the repository at this point in the history
update golangci-lint to v1.53.x
  • Loading branch information
k8s-ci-robot authored Jul 10, 2023
2 parents 9cad5f4 + b3bf804 commit 9eca09d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ updates:
labels:
- "area/dependency"
- "release-note-none"
- "ok-to-test"
open-pull-requests-limit: 10

- package-ecosystem: github-actions
Expand All @@ -16,4 +17,5 @@ updates:
labels:
- "area/dependency"
- "release-note-none"
- "ok-to-test"
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
with:
version: v1.51.2
version: v1.53
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- dupl
- durationcheck
Expand Down
4 changes: 2 additions & 2 deletions cmd/publishing-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ func main() { //nolint: gocyclo
if publisherErr != nil {
if exitErr, ok := publisherErr.(*exec.ExitError); ok {
os.Exit(exitErr.ExitCode())
} else {
os.Exit(1)
}

os.Exit(1)
}
break
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/publishing-bot/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (h *Server) Run(port int) error { //nolint: unparam
return nil
}

func (h *Server) runHandler(w http.ResponseWriter, r *http.Request) {
func (h *Server) runHandler(w http.ResponseWriter, _ *http.Request) {
if h.RunChan == nil {
http.Error(w, "run channel is closed", http.StatusInternalServerError)
return
Expand All @@ -94,7 +94,7 @@ func (h *Server) runHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("OK")) //nolint: errcheck
}

func (h *Server) healthzHandler(w http.ResponseWriter, r *http.Request) {
func (h *Server) healthzHandler(w http.ResponseWriter, _ *http.Request) {
h.mutex.RLock()
resp := h.response
if h.Issue != 0 {
Expand Down
2 changes: 1 addition & 1 deletion hack/verify-golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

VERSION=v1.51.2
VERSION=v1.53.3
URL_BASE=https://raw.githubusercontent.com/golangci/golangci-lint
URL=$URL_BASE/$VERSION/install.sh

Expand Down
5 changes: 1 addition & 4 deletions pkg/golang/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ func installGoVersion(v, pth string) error {
if err := cmd.Run(); err != nil {
return fmt.Errorf("command %q failed: %v", strings.Join(cmd.Args, " "), err)
}
if err := os.Rename(tmpPath, pth); err != nil {
return err
}

return nil
return os.Rename(tmpPath, pth)
}

0 comments on commit 9eca09d

Please sign in to comment.