Add asasalint linter

This commit is contained in:
Deluan 2022-09-30 19:55:44 -04:00
parent 4209e14208
commit 0798959be8
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ run:
linters:
enable:
- asasalint
- bodyclose
- depguard
- dogsled

View File

@ -13,11 +13,11 @@ var _ = Describe("Operators", func() {
rangeStart := Time(time.Date(2021, 10, 01, 0, 0, 0, 0, time.Local))
rangeEnd := Time(time.Date(2021, 11, 01, 0, 0, 0, 0, time.Local))
DescribeTable("ToSQL",
func(op Expression, expectedSql string, expectedArgs ...interface{}) {
func(op Expression, expectedSql string, expectedArgs ...any) {
sql, args, err := op.ToSql()
gomega.Expect(err).ToNot(gomega.HaveOccurred())
gomega.Expect(sql).To(gomega.Equal(expectedSql))
gomega.Expect(args).To(gomega.ConsistOf(expectedArgs))
gomega.Expect(args).To(gomega.ConsistOf(expectedArgs...))
},
Entry("is [string]", Is{"title": "Low Rider"}, "media_file.title = ?", "Low Rider"),
Entry("is [bool]", Is{"loved": true}, "COALESCE(annotation.starred, false) = ?", true),