I got tired of migration linters that just grep for scary keywords. CREATE INDEX without CONCURRENTLY? Flag it. Done. That's most of what's out there.
It falls apart the second your migration does this:
ALTER TABLE users RENAME TO users_v2;
ALTER TABLE orders ADD CONSTRAINT fk_user
FOREIGN KEY (user_id) REFERENCES users_v2(id);






