sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Allow selective disabling of rules per query

Open rhodeon opened this issue 1 year ago • 1 comments

This resolves #3619 and has some minor refactor in regards to reusable constants.

As mentioned there, the @sqlc-vet-disable query annotation now accepts a list of rules to skip:

/* @sqlc-vet-disable sqlc/db-prepare no-pg */

Providing just /* @sqlc-vet-disable */ without any parameters retains the previous behaviour of skipping all rules for a query.

rhodeon avatar Sep 29 '24 00:09 rhodeon

@kyleconroy, can you please confirm if this is something worth having? We have quite a few queries which benefit from it.

rhodeon avatar Oct 17 '24 15:10 rhodeon

Hey, @kyleconroy. 🫡 I noticed you made a push for this about a week ago. Is there something else I need to do for it to be merged into main?

rhodeon avatar Dec 01 '24 20:12 rhodeon

@rhodeon thanks for the updated push. The docs and tests are great! This will go out with the next release.

kyleconroy avatar Dec 02 '24 17:12 kyleconroy