mirror of
https://github.com/alist-org/gofakes3.git
synced 2025-12-24 12:58:04 +08:00
lint: enable staticcheck and fix problems
This commit is contained in:
@@ -8,7 +8,7 @@ linters:
|
||||
- ineffassign
|
||||
- govet
|
||||
- unconvert
|
||||
#- staticcheck
|
||||
- staticcheck
|
||||
- gosimple
|
||||
- stylecheck
|
||||
- unused
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user