[package]
name = "pgsafe"
version = "0.11.0"
edition = "2021"
description = "Static safety linter for PostgreSQL DDL migrations — catches unsafe schema changes before they lock or break production."
license = "Apache-2.0"
readme = "README.md"
keywords = ["postgres", "postgresql", "migrations", "ddl", "linter"]
categories = ["development-tools", "database"]
repository = "https://github.com/fixed-width/pgsafe"
rust-version = "1.80"
documentation = "https://docs.rs/pgsafe"
exclude = ["site/", "wasm/", "scripts/", ".github/", "action.yml"]
[dependencies]
pg_query = "6.1"
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
clap = { version = "4", features = ["derive"], optional = true }
toml = { version = "0.8", optional = true }
globset = { version = "0.4", optional = true }
thiserror = "2"
anstyle = "1"
[features]
default = ["cli"]
cli = ["dep:clap", "dep:toml", "dep:globset"]
[[bin]]
name = "pgsafe"
path = "src/main.rs"
required-features = ["cli"]
[dev-dependencies]
assert_cmd = "2.2"
clap = "4"
predicates = "3.1"
tempfile = "3"
criterion = "0.8.2"
postgres = "0.19"
[[bench]]
name = "lint"
harness = false
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
missing_errors_doc = "warn"
cast_sign_loss = "warn"
cast_possible_truncation = "warn"