Skip to content

Commit

Permalink
now tried version latest for golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bgn42 committed Aug 30, 2024
1 parent c8e878a commit 08ab57d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: golangci/golangci-lint-action@v6
with:
# must be specified without patch version
version: v1.36
version: latest

format:
name: Format
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ run:
linters:
disable-all: true # Disable defaults, then enable the ones we want
enable:
- deadcode
# - deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
# - structcheck
- typecheck
- unused
- varcheck
# - varcheck
- bodyclose
- stylecheck
- gosec
Expand Down
4 changes: 1 addition & 3 deletions cmd/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -220,7 +219,6 @@ func TestReadXML(t *testing.T) {
t.Run("test local xml file fails to read", func(t *testing.T) {
errString := "failed to read file"

// ioutil.ReadAll is just an alias to io.ReadAll
monkey.Patch(io.ReadAll, func(r io.Reader) ([]byte, error) {
var empty []byte
return empty, errors.New(errString)
Expand Down Expand Up @@ -320,7 +318,7 @@ func TestWriteXML(t *testing.T) {
t.Errorf("WriteXML should not return error on valid xml and valid file: %s", err)
}

written, err2 := ioutil.ReadFile(fileName)
written, err2 := os.ReadFile(fileName)
if err2 != nil {
t.Fatalf("Can't open file %s to test if XML got actually written: %s", fileName, err2)
}
Expand Down

0 comments on commit 08ab57d

Please sign in to comment.