Skip to content

Commit

Permalink
Add test/vet/linting errors on purpose to test CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbollen committed Apr 26, 2024
1 parent 5921bb5 commit 4444064
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/poki/mongodb-filter-to-postgres/filter"
)

func ExampleNewConverter() {
func ExampleNewConverter_NotAMethod() {

Check failure on line 9 in examples/basic_test.go

View workflow job for this annotation

GitHub Actions / go vet

ExampleNewConverter_NotAMethod refers to unknown field or method: NewConverter.NotAMethod
// Remeber to use `filter.WithArrayDriver(pg.Array)` when using github.com/lib/pq
converter := filter.NewConverter(filter.WithNestedJSONB("meta", "created_at", "updated_at"))

Expand Down
2 changes: 1 addition & 1 deletion filter/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestConverter_Convert(t *testing.T) {
"flat single value",
nil,
`{"name": "John"}`,
`("name" = $1)`,
`("name" = $1`,
[]any{"John"},
nil,
},
Expand Down
3 changes: 0 additions & 3 deletions integration/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ func TestIntegration_ReadmeExample(t *testing.T) {
}`

where, values, err := c.Convert([]byte(in))

Check failure on line 61 in integration/postgres_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint

ineffectual assignment to err (ineffassign)
if err != nil {
t.Fatal(err)
}

rows, err := db.Query(`
SELECT id
Expand Down

0 comments on commit 4444064

Please sign in to comment.