-
Notifications
You must be signed in to change notification settings - Fork 4
Flagging any method named All as SELECT *? #5
Copy link
Copy link
Closed
Description
I have some API code that's calling an All method in the DB layer and this linter is flagging it as SELECT *. The DB layer is being mocked so the flagging seems suspect. Here's the interface the API code is calling:
type WidgetDB interface {
All(ctx context.Context) ([]tsql.Widget, error)
}Here's the test code getting flagged (widgetDBMoq is a mock of WidgetDB):
widgetDBMoq.onCall().All(req.Context()).
returnResults([]tsql.Widget{dbWidget1, dbWidget2}, nil)And here's the linter output:
api/internal/widget_test.go:95:4: SQLBoiler model().All() without qm.Select() defaults to SELECT * (unqueryvet)
widgetDBMoq.onCall().All(req.Context()).
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels