-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
31 lines (27 loc) · 1.58 KB
/
Copy pathclippy.toml
File metadata and controls
31 lines (27 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Portable stella Rust lint configuration, distributed via ai-shared and pulled
# into consumer repos through `.ai/manifest.json` "sharedRootFiles".
#
# This is the org-wide baseline. Repos with stricter, domain-specific needs
# (for example the anonymization pipeline, which additionally bans wall-clock
# and RNG access for deterministic output) should NOT list clippy.toml in their
# manifest; they keep a local clippy.toml instead. Anything added here must be
# safe for every consumer, so determinism-specific bans stay out.
disallowed-macros = [
{ path = "std::dbg", reason = "remove debug output before commit" },
{ path = "std::print", reason = "library crates should return data or use structured logging" },
{ path = "std::println", reason = "library crates should return data or use structured logging" },
{ path = "std::eprint", reason = "library crates should return data or use structured logging" },
{ path = "std::eprintln", reason = "library crates should return data or use structured logging" },
]
disallowed-methods = [
{ path = "std::mem::forget", reason = "leaks ownership; use a narrow ownership type or ManuallyDrop with justification" },
{ path = "std::string::String::from_utf8_lossy", reason = "lossy decoding can corrupt offsets and user data; validate or keep bytes" },
]
disallowed-types = [
{ path = "std::collections::LinkedList", reason = "prefer Vec, VecDeque, or an explicit intrusive structure" },
]
pass-by-value-size-limit = 64
stack-size-threshold = 131072
enum-variant-size-threshold = 128
too-large-for-stack = 4096
accept-comment-above-attributes = true