linter for Postgres migrations that prevents downtime for migrations and backwards incompatible changes.
Prevent unexpected downtime caused by database migrations.
Also it seemed like a nice project to spend more time with Rust.
shell
cargo install
cargo test
cargo run
cargo clippy -- -W clippy::nursery
cargo fmt
squawk wraps calls to libpgquery-sys in a safe interface and parses the JSON into eaiser to work with structures. libpgquery-sys in turn uses bindgen to bind to libpg_query, which itself wraps Postgres' SQL parser in a bit of C code that outputs the parsed AST into a JSON string.
Squawk then runs the rule functions over the parsed AST, gathers and pretty prints the rule violations.