Skip to main content

cratefield_cli/
lint.rs

1//! The portable-SQL lint (issue #8): flags tokens that SQLite and Postgres
2//! disagree about, or that betray non-portable DDL. The canonical definition
3//! lives in `cratefield-core` ([`lint_portable_sql`]) so the Postgres
4//! migration runner selects against the identical predicate (issue #18).
5
6pub use cratefield_core::lint_portable_sql;
7
8/// Returns `(token, explanation)` pairs found in `sql`.
9///
10/// Kept as an alias for `fz doctor`; see [`lint_portable_sql`].
11#[must_use]
12pub fn banned_tokens(sql: &str) -> Vec<(&'static str, &'static str)> {
13    lint_portable_sql(sql)
14}