diff --git a/Cargo.toml b/Cargo.toml index 6e0b6760..b7d17757 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,3 +23,9 @@ members = [ "tests/sqlx", ] default-members = ["tests/sqlx"] + +# Dead code is a hard error. Note: rustc exempts unused `pub` items in a lib, so +# don't `pub` a test-support item unless an integration test consumes it. +[workspace.lints.rust] +dead_code = "deny" +unused_imports = "deny" diff --git a/crates/eql-codegen/Cargo.toml b/crates/eql-codegen/Cargo.toml index 25165397..113be53a 100644 --- a/crates/eql-codegen/Cargo.toml +++ b/crates/eql-codegen/Cargo.toml @@ -16,3 +16,6 @@ path = "src/main.rs" [lib] name = "eql_codegen" path = "src/lib.rs" + +[lints] +workspace = true diff --git a/crates/eql-scalars/Cargo.toml b/crates/eql-scalars/Cargo.toml index 093b1a12..ca9e5341 100644 --- a/crates/eql-scalars/Cargo.toml +++ b/crates/eql-scalars/Cargo.toml @@ -8,3 +8,6 @@ description = "Scalar/term catalog for EQL encrypted-domain codegen (std-only, n # generator (eql-codegen) compiles in ~1-2s and never drags serde/toml onto the # SQL build's critical path. Do not add deps here. [dependencies] + +[lints] +workspace = true diff --git a/crates/eql-tests-macros/Cargo.toml b/crates/eql-tests-macros/Cargo.toml index cc92e04c..6cad3d7e 100644 --- a/crates/eql-tests-macros/Cargo.toml +++ b/crates/eql-tests-macros/Cargo.toml @@ -12,3 +12,6 @@ syn = { version = "2", features = ["full"] } quote = "1" proc-macro2 = "1" eql-scalars = { path = "../eql-scalars" } + +[lints] +workspace = true diff --git a/tests/sqlx/Cargo.toml b/tests/sqlx/Cargo.toml index e67941c1..fbdd9506 100644 --- a/tests/sqlx/Cargo.toml +++ b/tests/sqlx/Cargo.toml @@ -23,6 +23,9 @@ eql-tests-macros = { path = "../../crates/eql-tests-macros" } [dev-dependencies] # None needed - tests live in this crate +[lints] +workspace = true + [features] default = [] # Opt-in to slow benchmark / regression / scale tests. Without this feature diff --git a/tests/sqlx/src/index_types.rs b/tests/sqlx/src/index_types.rs deleted file mode 100644 index 26603b3c..00000000 --- a/tests/sqlx/src/index_types.rs +++ /dev/null @@ -1,21 +0,0 @@ -//! Index type constants for EQL tests -//! -//! Prevents typos in index type strings across test files - -/// HMAC-256 index type -pub const HMAC: &str = "hm"; - -/// Blake3 index type -pub const BLAKE3: &str = "b3"; - -/// ORE 64-bit index type -pub const ORE64: &str = "ore64"; - -/// ORE CLLW U64 8-byte index type -pub const ORE_CLLW_U64_8: &str = "ore_cllw_u64_8"; - -/// ORE CLLW Variable 8-byte index type -pub const ORE_CLLW_VAR_8: &str = "ore_cllw_var_8"; - -/// ORE Block U64 8-byte 256-bit index type -pub const ORE_BLOCK_U64_8_256: &str = "ore_block_u64_8_256"; diff --git a/tests/sqlx/src/lib.rs b/tests/sqlx/src/lib.rs index 4386222b..47196030 100644 --- a/tests/sqlx/src/lib.rs +++ b/tests/sqlx/src/lib.rs @@ -7,7 +7,6 @@ use sqlx::PgPool; pub mod assertions; pub mod fixtures; pub mod helpers; -pub mod index_types; pub mod matrix; pub mod scalar_domains; #[macro_use] @@ -37,7 +36,6 @@ pub use helpers::{ read_pg_stat_statements, reset_pg_stat_statements, ExplainStats, PgStatEntry, PLACEHOLDER_PAYLOAD, }; -pub use index_types as IndexTypes; pub use scalar_domains::{ assert_null, assert_raises, assert_scalar_plaintexts, blocker_msg, commute_op, fetch_fixture_payload, sql_string_literal, ScalarDomainSpec, ScalarType, Variant,