Diffinery

homeflare/celldpublic

celld/clippy.toml
90 lines · 9.0 KBRaw History
1# The execution boundary must use celld::asyncrt. Modules outside that boundary
2# carry an explicit lint allow.
3disallowed-methods = [
4 { path = "tokio::spawn", reason = "use celld::asyncrt::spawn inside the execution boundary" },
5 { path = "tokio::runtime::Handle::spawn", reason = "use celld::asyncrt::spawn inside the execution boundary" },
6 { path = "tokio::task::spawn_blocking", reason = "use celld::asyncrt::blocking inside the execution boundary" },
7 { path = "tokio::runtime::Handle::spawn_blocking", reason = "use celld::asyncrt::blocking inside the execution boundary" },
8 { path = "tokio::time::sleep", reason = "use celld::asyncrt::sleep inside the execution boundary" },
9 { path = "tokio::time::sleep_until", reason = "use celld::asyncrt::sleep_until inside the execution boundary" },
10 { path = "tokio::time::timeout", reason = "use celld::asyncrt::timeout inside the execution boundary" },
11 { path = "tokio::time::timeout_at", reason = "use celld::asyncrt::timeout_at inside the execution boundary" },
12 { path = "tokio::time::interval", reason = "use celld::asyncrt::interval inside the execution boundary" },
13 { path = "tokio::time::interval_at", reason = "use celld::asyncrt::interval_at inside the execution boundary" },
14 { path = "std::time::SystemTime::now", reason = "use the execution-domain wall clock inside the execution boundary" },
15 { path = "std::time::Instant::now", reason = "use the execution-domain monotonic clock inside the execution boundary" },
16 { path = "rand::random", reason = "use a labeled execution-domain RNG inside the execution boundary" },
17 { path = "std::process::id", reason = "use the execution-domain process tag inside the execution boundary" },
18 { path = "std::fs::read", reason = "use the injected whole-node filesystem for celld node storage" },
19 { path = "std::fs::read_to_string", reason = "use the injected whole-node filesystem for celld node storage" },
20 { path = "std::fs::read_dir", reason = "use the injected whole-node filesystem for celld node storage" },
21 { path = "std::fs::metadata", reason = "use the injected whole-node filesystem for celld node storage" },
22 { path = "std::fs::symlink_metadata", reason = "use the injected whole-node filesystem for celld node storage" },
23 { path = "std::fs::canonicalize", reason = "use the injected whole-node filesystem for celld node storage" },
24 { path = "std::fs::copy", reason = "use the injected whole-node filesystem for celld node storage" },
25 { path = "std::fs::exists", reason = "use injected filesystem metadata for celld node storage" },
26 { path = "std::fs::hard_link", reason = "use the injected whole-node filesystem for celld node storage" },
27 { path = "std::fs::read_link", reason = "use the injected whole-node filesystem for celld node storage" },
28 { path = "std::fs::File::create", reason = "use the injected whole-node filesystem for celld node storage" },
29 { path = "std::fs::File::open", reason = "use the injected whole-node filesystem for celld node storage" },
30 { path = "std::fs::File::options", reason = "use the injected whole-node filesystem for celld node storage" },
31 { path = "std::fs::File::sync_all", reason = "use the injected whole-node filesystem for celld node storage" },
32 { path = "std::fs::File::sync_data", reason = "use the injected whole-node filesystem for celld node storage" },
33 { path = "std::fs::OpenOptions::new", reason = "use the injected whole-node filesystem for celld node storage" },
34 { path = "std::fs::OpenOptions::open", reason = "use the injected whole-node filesystem for celld node storage" },
35 { path = "std::fs::write", reason = "use the injected whole-node filesystem for celld node storage" },
36 { path = "std::fs::rename", reason = "use the injected whole-node filesystem for celld node storage" },
37 { path = "std::fs::remove_file", reason = "use the injected whole-node filesystem for celld node storage" },
38 { path = "std::fs::remove_dir", reason = "use the injected whole-node filesystem for celld node storage" },
39 { path = "std::fs::remove_dir_all", reason = "use the injected whole-node filesystem for celld node storage" },
40 { path = "std::fs::create_dir", reason = "use the injected whole-node filesystem for celld node storage" },
41 { path = "std::fs::create_dir_all", reason = "use the injected whole-node filesystem for celld node storage" },
42 { path = "std::fs::set_permissions", reason = "use the injected whole-node filesystem for celld node storage" },
43 { path = "std::path::Path::exists", reason = "use injected filesystem metadata for celld node storage" },
44 { path = "std::path::Path::try_exists", reason = "use injected filesystem metadata for celld node storage" },
45 { path = "std::path::Path::is_file", reason = "use injected filesystem metadata for celld node storage" },
46 { path = "std::path::Path::is_dir", reason = "use injected filesystem metadata for celld node storage" },
47 { path = "std::path::Path::is_symlink", reason = "use injected filesystem metadata for celld node storage" },
48 { path = "std::path::Path::metadata", reason = "use injected filesystem metadata for celld node storage" },
49 { path = "std::path::Path::symlink_metadata", reason = "use injected filesystem metadata for celld node storage" },
50 { path = "std::path::Path::canonicalize", reason = "use the injected whole-node filesystem for celld node storage" },
51 { path = "std::path::Path::read_link", reason = "use the injected whole-node filesystem for celld node storage" },
52 { path = "std::path::Path::read_dir", reason = "use the injected whole-node filesystem for celld node storage" },
53 { path = "tokio::fs::read", reason = "use the injected whole-node filesystem for celld node storage" },
54 { path = "tokio::fs::read_dir", reason = "use the injected whole-node filesystem for celld node storage" },
55 { path = "tokio::fs::read_to_string", reason = "use the injected whole-node filesystem for celld node storage" },
56 { path = "tokio::fs::metadata", reason = "use the injected whole-node filesystem for celld node storage" },
57 { path = "tokio::fs::symlink_metadata", reason = "use the injected whole-node filesystem for celld node storage" },
58 { path = "tokio::fs::canonicalize", reason = "use the injected whole-node filesystem for celld node storage" },
59 { path = "tokio::fs::copy", reason = "use the injected whole-node filesystem for celld node storage" },
60 { path = "tokio::fs::try_exists", reason = "use injected filesystem metadata for celld node storage" },
61 { path = "tokio::fs::hard_link", reason = "use the injected whole-node filesystem for celld node storage" },
62 { path = "tokio::fs::read_link", reason = "use the injected whole-node filesystem for celld node storage" },
63 { path = "tokio::fs::File::create", reason = "use the injected whole-node filesystem for celld node storage" },
64 { path = "tokio::fs::File::open", reason = "use the injected whole-node filesystem for celld node storage" },
65 { path = "tokio::fs::File::sync_all", reason = "use the injected whole-node filesystem for celld node storage" },
66 { path = "tokio::fs::File::sync_data", reason = "use the injected whole-node filesystem for celld node storage" },
67 { path = "tokio::fs::OpenOptions::new", reason = "use the injected whole-node filesystem for celld node storage" },
68 { path = "tokio::fs::OpenOptions::open", reason = "use the injected whole-node filesystem for celld node storage" },
69 { path = "tokio::fs::write", reason = "use the injected whole-node filesystem for celld node storage" },
70 { path = "tokio::fs::rename", reason = "use the injected whole-node filesystem for celld node storage" },
71 { path = "tokio::fs::remove_file", reason = "use the injected whole-node filesystem for celld node storage" },
72 { path = "tokio::fs::remove_dir", reason = "use the injected whole-node filesystem for celld node storage" },
73 { path = "tokio::fs::remove_dir_all", reason = "use the injected whole-node filesystem for celld node storage" },
74 { path = "tokio::fs::create_dir", reason = "use the injected whole-node filesystem for celld node storage" },
75 { path = "tokio::fs::create_dir_all", reason = "use the injected whole-node filesystem for celld node storage" },
76 { path = "tokio::fs::set_permissions", reason = "use the injected whole-node filesystem for celld node storage" },
77]
78
79# The celld and celld-ltx packages forbid these macros, so no module can lower
80# this policy. Clippy resolves imported and aliased macro calls in every
81# target that Cargo compiles for these packages.
82disallowed-macros = [
83 { path = "tokio::select", reason = "use celld::asyncrt::select! for fair polling or select_biased! with a site reason for source-order priority; production uses a process-seeded cyclic start, and simulation uses Domain-derived ordering" },
84 { path = "std::println", reason = "use celld::cli_output::Output for celld stdout data and note! for human-readable stderr messages" },
85 { path = "std::print", reason = "use celld::cli_output::Output for celld stdout data and note! for human-readable stderr messages" },
86]
87
88disallowed-types = [
89 { path = "rand::rngs::OsRng", reason = "use a labeled execution-domain RNG inside the execution boundary" },
90]