mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Direct SQLx constructors can bypass the shared SQLite configuration in `codex-state`. ## What changed - Deny SQLx pool, connection, and database creation methods through the workspace Clippy configuration for both Cargo and Bazel builds. - Exempt `codex-rs/state/src/sqlite.rs`, the centralized connection shim, from the lint. - Document that the deny list must be audited when upgrading SQLx. GitOrigin-RevId: e20d7e83095727ac446347157782175062a100fc
33 lines
2.7 KiB
TOML
33 lines
2.7 KiB
TOML
allow-expect-in-tests = true
|
|
allow-unwrap-in-tests = true
|
|
await-holding-invalid-types = [
|
|
"tokio::sync::MutexGuard",
|
|
"tokio::sync::RwLockReadGuard",
|
|
"tokio::sync::RwLockWriteGuard",
|
|
]
|
|
disallowed-methods = [
|
|
{ path = "ratatui::style::Color::Rgb", reason = "Use ANSI colors, which work better in various terminal themes." },
|
|
{ path = "ratatui::style::Color::Indexed", reason = "Use ANSI colors, which work better in various terminal themes." },
|
|
{ path = "ratatui::style::Stylize::white", reason = "Avoid hardcoding white; prefer default fg or dim/bold. Exception: Disable this rule if rendering over a hardcoded ANSI background." },
|
|
{ path = "ratatui::style::Stylize::black", reason = "Avoid hardcoding black; prefer default fg or dim/bold. Exception: Disable this rule if rendering over a hardcoded ANSI background." },
|
|
{ path = "ratatui::style::Stylize::yellow", reason = "Avoid yellow; prefer other colors in `tui/styles.md`." },
|
|
# Audited against workspace sqlx 0.9.0. Revisit this SQLite escape-hatch list when bumping sqlx.
|
|
{ path = "sqlx::Pool::connect", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Pool::connect_with", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Pool::connect_lazy", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Pool::connect_lazy_with", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Pool::set_connect_options", reason = "Do not replace options on SQLite pools created by codex-state's sqlite shim." },
|
|
{ path = "sqlx::pool::PoolOptions::connect", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::pool::PoolOptions::connect_with", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::pool::PoolOptions::connect_lazy", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::pool::PoolOptions::connect_lazy_with", reason = "Create SQLite pools through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Connection::connect", reason = "Create SQLite connections through codex-state's sqlite shim." },
|
|
{ path = "sqlx::Connection::connect_with", reason = "Create SQLite connections through codex-state's sqlite shim." },
|
|
{ path = "sqlx::ConnectOptions::connect", reason = "Create SQLite connections through codex-state's sqlite shim." },
|
|
{ path = "sqlx::migrate::MigrateDatabase::create_database", reason = "Create SQLite databases through codex-state's sqlite shim." },
|
|
]
|
|
|
|
# Increase the size threshold for result_large_err to accommodate
|
|
# richer error variants.
|
|
large-error-threshold = 256
|