-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathclippy.toml
More file actions
42 lines (39 loc) · 2.15 KB
/
clippy.toml
File metadata and controls
42 lines (39 loc) · 2.15 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
32
33
34
35
36
37
38
39
40
41
42
disallowed-methods = [
{ path = "std::fs::read", reason = "use bun_sys::file" },
{ path = "std::fs::write", reason = "use bun_sys::file" },
{ path = "std::fs::read_to_string", reason = "use bun_sys::file" },
{ path = "std::fs::remove_file", reason = "use bun_sys::file" },
{ path = "std::fs::remove_dir_all", reason = "use bun_sys::dir" },
{ path = "std::fs::create_dir", reason = "use bun_sys::dir" },
{ path = "std::fs::create_dir_all", reason = "use bun_sys::dir" },
{ path = "std::fs::metadata", reason = "use bun_sys::file" },
{ path = "std::fs::canonicalize", reason = "use bun_paths" },
{ path = "std::env::var", reason = "use bun_core::env_var" },
{ path = "std::env::var_os", reason = "use bun_core::env_var" },
{ path = "std::thread::spawn", reason = "use bun_threading::spawn_named or ThreadPool" },
{ path = "std::mem::zeroed", reason = "use MaybeUninit; zeroed is UB for most Bun types" },
]
disallowed-types = [
{ path = "std::sync::Mutex", reason = "use bun_threading::Mutex" },
{ path = "std::sync::RwLock", reason = "use bun_threading::RwLock" },
{ path = "parking_lot::Mutex", reason = "use bun_threading::Mutex" },
{ path = "parking_lot::RwLock", reason = "use bun_threading::RwLock" },
{ path = "parking_lot::RawMutex", reason = "use bun_threading::Mutex" },
{ path = "std::collections::HashMap", reason = "use bun_collections (wyhash)" },
{ path = "std::collections::HashSet", reason = "use bun_collections (wyhash)" },
{ path = "std::fs::File", reason = "use bun_sys::File" },
{ path = "std::process::Command", reason = "use bun_core::util::spawn_sync_inherit (CLI helpers) or bun_spawn_sys (full control)" },
]
disallowed-macros = [
{ path = "std::println", reason = "use bun_core::output" },
{ path = "std::eprintln", reason = "use bun_core::output" },
{ path = "std::print", reason = "use bun_core::output" },
{ path = "std::eprint", reason = "use bun_core::output" },
{ path = "std::dbg", reason = "remove before commit" },
]
pass-by-value-size-limit = 64
stack-size-threshold = 131072
enum-variant-size-threshold = 128
too-large-for-stack = 4096
avoid-breaking-exported-api = false
accept-comment-above-attributes = true