Skip to content

Commit

Permalink
lint: enable staticcheck and fix problems
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Apr 13, 2024
1 parent 0d0c480 commit 372c3e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ linters:
- ineffassign
- govet
- unconvert
#- staticcheck
- staticcheck
- gosimple
- stylecheck
- unused
Expand Down
6 changes: 3 additions & 3 deletions s3mem/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ func (db *Backend) DeleteMulti(ctx context.Context, bucketName string, objects .

if err != nil {
errres := gofakes3.ErrorResultFromError(err)
if errres.Code == gofakes3.ErrInternal {
// FIXME: log
}
// if errres.Code == gofakes3.ErrInternal {
// // FIXME: log
// }

result.Error = append(result.Error, errres)

Expand Down
2 changes: 2 additions & 0 deletions xml/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,7 @@ func TestMarshal(t *testing.T) {
}

type AttrParent struct {
//nolint:staticcheck // FIXME invalid XML tag: X>Y chain not valid with attr flag
X string `xml:"X>Y,attr"`
}

Expand Down Expand Up @@ -2494,6 +2495,7 @@ func TestIssue16158(t *testing.T) {
type InvalidXMLName struct {
XMLName Name `xml:"error"`
Type struct {
//nolint:staticcheck // FIXME invalid XML tag: cannot use option attr on XMLName field
XMLName Name `xml:"type,attr"`
}
}
Expand Down

0 comments on commit 372c3e7

Please sign in to comment.