diff --git a/.golangci.yml b/.golangci.yml index 33841f429..89ed6e89c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,10 @@ linters-settings: govet: check-shadowing: true + disable: + # printf: non-constant format string in call to fmt.Errorf (govet) + # showing up since golangci-lint version 1.60.1 + - printf # enable: # - fieldalignment FIXME: golint: diff --git a/structtemplater_test.go b/structtemplater_test.go index eb2ef21f4..34eb1fe9e 100644 --- a/structtemplater_test.go +++ b/structtemplater_test.go @@ -222,7 +222,7 @@ func TestStructTemplater(t *testing.T) { if err := test.StructTemplater.Walk(i); err != nil { t.Error(err) } else if diff := cmp.Diff(i, test.Output); diff != "" { - t.Errorf(diff) + t.Error(diff) } }) } diff --git a/tests/cel_test.go b/tests/cel_test.go index e4dcc6ae2..1fab06503 100644 --- a/tests/cel_test.go +++ b/tests/cel_test.go @@ -136,7 +136,7 @@ func TestCelData(t *testing.T) { Address: &Address{City: "Kathmandu"}, } runTests(t, []Test{ - {map[string]interface{}{"i": newFolderCheck(1)}, "i.files[0].modified", testDate}, + {map[string]interface{}{"i": newFolderCheck(1)}, "i.files[0].modified", testDateTime.String()}, {map[string]interface{}{"i": person}, "YAML(toYAML(i)).name", "Aditya"}, // csv {nil, `CSV(["Alice,30", "Bob,31"])[0][0]`, "Alice"}, diff --git a/tests/serialize_test.go b/tests/serialize_test.go index faba9d4e9..b9f3f1ef0 100644 --- a/tests/serialize_test.go +++ b/tests/serialize_test.go @@ -87,12 +87,12 @@ func Test_serialize(t *testing.T) { "name": "test", "size": int64(10), "mode": "drwxr-xr-x", - "modified": testDate, + "modified": testDateTime, }, }, "newest": map[string]any{ "mode": "drwxr-xr-x", - "modified": testDate, + "modified": testDateTime, "name": "test", "size": int64(10), },