lint: enable staticcheck and fix problems

This commit is contained in:
Nick Craig-Wood
2024-04-13 17:37:49 +01:00
parent 0d0c480686
commit 372c3e746e
3 changed files with 6 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ linters:
- ineffassign
- govet
- unconvert
#- staticcheck
- staticcheck
- gosimple
- stylecheck
- unused

View File

@@ -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)

View File

@@ -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"`
}
@@ -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"`
}
}