Skip to content

Commit b218130

Browse files
hyperpolymathclaude
andcommitted
chore(lint): remove blanket #![allow(...)] blocks; fix surfaced lints
The 13-lint allow block in both lib.rs and main.rs silenced clippy across the codebase, making `just lint` (`cargo clippy -- -D warnings`) a hollow signal. Removed both blocks and fixed every lint clippy surfaced. Fixes: - codegen/query.rs:124 — nested format!() flagged by `clippy::format_in_format_args`. Combined `format!("{}::text", format!("{}.ctid", t))` into `format!("{}.ctid::text", t)`. - manifest/mod.rs:309 — `init_manifest` had a dead ternary returning "false" on both branches (flagged by `clippy::if_same_then_else`). Replaced with a single binding plus a comment explaining where the per-backend toggle would go if/when it becomes real. - main.rs — was re-declaring `mod abi; mod codegen; mod intercept; mod manifest; mod tier1; mod tier2;` already declared in `lib.rs`, so each module compiled twice. From the bin's perspective most of the ABI types (ProvenanceEntry, LineageEdge, TemporalVersion, AccessPolicy, SidecarConfig, DriftCategory, …) appeared as dead code. Replaced the six `mod …;` lines with `use verisimiser::{abi, codegen, manifest};` so the bin consumes the library properly. This also halves redundant test runs (35 unique tests instead of 61 with duplicates). Verified: - `cargo clippy --all-targets -- -D warnings` exits clean - `cargo test` reports 26 lib + 9 integration tests, 0 failed Closes #16, #17 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6a0ccfd commit b218130

4 files changed

Lines changed: 7 additions & 41 deletions

File tree

src/codegen/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn build_entity_id_expr(pk_columns: &[&str], table_name: &str, backend: Database
121121
// No PK defined — fall back to internal row identifier.
122122
match backend {
123123
DatabaseBackend::SQLite => format!("{}.rowid", table_name),
124-
DatabaseBackend::PostgreSQL => format!("{}::text", format!("{}.ctid", table_name)),
124+
DatabaseBackend::PostgreSQL => format!("{}.ctid::text", table_name),
125125
DatabaseBackend::MongoDB => "CAST(_id AS TEXT)".to_string(),
126126
}
127127
} else if pk_columns.len() == 1 {

src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
11
#![forbid(unsafe_code)]
2-
#![allow(
3-
dead_code,
4-
clippy::too_many_arguments,
5-
clippy::manual_strip,
6-
clippy::if_same_then_else,
7-
clippy::vec_init_then_push,
8-
clippy::upper_case_acronyms,
9-
clippy::format_in_format_args,
10-
clippy::enum_variant_names,
11-
clippy::module_inception,
12-
clippy::doc_lazy_continuation,
13-
clippy::manual_clamp,
14-
clippy::type_complexity
15-
)]
162
// SPDX-License-Identifier: PMPL-1.0-or-later
173
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
184
//

src/main.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
#![allow(
2-
dead_code,
3-
clippy::too_many_arguments,
4-
clippy::manual_strip,
5-
clippy::if_same_then_else,
6-
clippy::vec_init_then_push,
7-
clippy::upper_case_acronyms,
8-
clippy::format_in_format_args,
9-
clippy::enum_variant_names,
10-
clippy::module_inception,
11-
clippy::doc_lazy_continuation,
12-
clippy::manual_clamp,
13-
clippy::type_complexity
14-
)]
151
#![forbid(unsafe_code)]
162
// SPDX-License-Identifier: PMPL-1.0-or-later
173
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
@@ -31,13 +17,7 @@
3117

3218
use anyhow::Result;
3319
use clap::{Parser, Subcommand};
34-
35-
mod abi;
36-
mod codegen;
37-
mod intercept;
38-
mod manifest;
39-
mod tier1;
40-
mod tier2;
20+
use verisimiser::{abi, codegen, manifest};
4121

4222
/// VeriSimiser — augment any database with VeriSimDB octad capabilities.
4323
#[derive(Parser)]

src/manifest/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ pub fn init_manifest(database: &str) -> Result<()> {
306306
anyhow::bail!("{} already exists — remove it first to reinitialise", path);
307307
}
308308

309-
let enable_simulation = if database == "sqlite" {
310-
"false"
311-
} else {
312-
"false"
313-
};
309+
// Simulation defaults to off across all backends. The previous ternary
310+
// returned "false" on both branches; if backend-specific defaults are
311+
// needed later (e.g. enable simulation only when the storage is SQLite),
312+
// this is the place to add them.
313+
let enable_simulation = "false";
314314

315315
let template = format!(
316316
r#"# SPDX-License-Identifier: PMPL-1.0-or-later

0 commit comments

Comments
 (0)