feat(lint): add linter rules for migration and naming conventions
* Implement migration safety rules: - MIG001: Warn on CREATE INDEX without CONCURRENT. - MIG002: Warn on ALTER TABLE ADD COLUMN NOT NULL without DEFAULT. - MIG003: Warn on ALTER TABLE ADD CONSTRAINT without NOT VALID. * Implement naming conventions rules: - NAM001: Warn on non-snake_case table names. - NAM002: Warn on non-snake_case column names in CREATE TABLE. - NAM003: Warn on non-snake_case function names. * Add test fixtures for all new rules.
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
-- Fixtures for correctness rules (COR001-COR003).
|
||||
|
||||
-- COR001: SELECT *
|
||||
SELECT * FROM orders;
|
||||
|
||||
-- COR002: UPDATE without WHERE
|
||||
UPDATE orders SET status = 'archived';
|
||||
|
||||
-- COR003: DELETE without WHERE
|
||||
DELETE FROM orders;
|
||||
Reference in New Issue
Block a user