diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
| commit | 4304b0f336ddba7b4ec6780795059ff2066d105b (patch) | |
| tree | 10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /tests/schema_ownership.rs | |
| parent | e757979f1a2afdbe7146066345bb9acd19d3b151 (diff) | |
| download | aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip | |
comments: keep only what the code cannot show
Stripped every comment that described what an item does, documented its
arguments or fields, or cited the design docs (§n, I-n, m-n, decision n).
2247 comments down to 83.
What survives: the section dividers that segment the large modules, the
secret-handling warnings, the agent wire-frame directions, and the few notes
without which the code they attach to reads as redundant, reorderable, or
unsound.
Diffstat (limited to 'tests/schema_ownership.rs')
| -rw-r--r-- | tests/schema_ownership.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/schema_ownership.rs b/tests/schema_ownership.rs index 07345dd..944038c 100644 --- a/tests/schema_ownership.rs +++ b/tests/schema_ownership.rs @@ -1,15 +1,10 @@ use std::path::{Path, PathBuf}; -/// String literals that begin a statement. Matched on the quote so a prose -/// comment that mentions a `SELECT` cannot trip it, and comment lines are -/// skipped anyway. const SQL_LITERALS: &[&str] = &[ "\"SELECT", "\"select", "\"INSERT", "\"insert", "\"UPDATE", "\"update", "\"DELETE", "\"delete", "\"PRAGMA", "\"WITH", ]; -/// rusqlite entry points. Outside `db/` there is nothing legitimate to hand -/// them, since every statement string is supposed to live in `db/`. const STATEMENT_CALLS: &[&str] = &[ ".query_row(", ".query_map(", ".execute(", ".execute_batch(", ".prepare(", ".pragma_query_value(", ]; @@ -35,7 +30,6 @@ fn no_sql_statements_outside_the_db_module() { let mut offenders: Vec<String> = Vec::new(); for file in files { let rel = file.strip_path(&root); - // The owner of the schema is allowed to contain SQL. if rel.starts_with("db/") || rel.starts_with("db\\") { continue; } @@ -60,10 +54,6 @@ fn no_sql_statements_outside_the_db_module() { ); } -/// m-18: the version a human reads is `pkgver::full_version`'s to produce — -/// `epoch:pkgver-pkgrel`, with the epoch omitted when it is `0` or empty. That rule -/// used to exist twice, once in Rust and once in SQL. SQL selects the parts; Rust -/// formats them. #[test] fn only_rust_formats_a_version() { let root = Path::new(env!("CARGO_MANIFEST_DIR")); @@ -87,8 +77,6 @@ fn only_rust_formats_a_version() { ); } -/// `src/db/queries.rs` → `db/queries.rs`, so the failure message points at the -/// module rather than an absolute path. trait StripPath { fn strip_path(&self, root: &Path) -> String; } |
