Skip to content

Commit

Permalink
chore: update lint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Aug 30, 2024
1 parent 665992d commit 7341e9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion structtemplater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
4 changes: 2 additions & 2 deletions tests/serialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down

0 comments on commit 7341e9c

Please sign in to comment.