File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,24 @@ rules:
259
259
# ## Opting-out of lint rules
260
260
261
261
For any query, you can tell `sqlc vet` not to evaluate lint rules using the
262
- ` @sqlc-vet-disable` query annotation.
262
+ ` @sqlc-vet-disable` query annotation. The annotation accepts a list of rules to ignore.
263
+
264
+ ` ` ` sql
265
+ /* name: GetAuthor :one */
266
+ /* @sqlc-vet-disable sqlc/db-prepare no-pg */
267
+ SELECT * FROM authors
268
+ WHERE id = ? LIMIT 1;
269
+ ` ` `
270
+ The rules can also be split across lines.
271
+ ` ` ` sql
272
+ /* name: GetAuthor :one */
273
+ /* @sqlc-vet-disable sqlc/db-prepare */
274
+ /* @sqlc-vet-disable no-pg */
275
+ SELECT * FROM authors
276
+ WHERE id = ? LIMIT 1;
277
+ ` ` `
278
+
279
+ To skip all rules for a query, you can provide the `@sqlc-vet-disable` annotation without any options.
263
280
264
281
` ` ` sql
265
282
/* name: GetAuthor :one */
You can’t perform that action at this time.
0 commit comments