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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copied from https://github.com/rerun-io/rerun_template
#
# There is also a scripts/clippy_wasm/clippy.toml which forbids some methods that are not available in wasm.
# -----------------------------------------------------------------------------
# Section identical to scripts/clippy_wasm/clippy.toml:
= "1.92.0"
= true
# https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#avoid-breaking-exported-api
# We want suggestions, even if it changes public API.
= false
= 8
= 1
# https://rust-lang.github.io/rust-clippy/master/index.html#/large_include_file
= 1000000
# https://rust-lang.github.io/rust-clippy/master/index.html#/large_stack_frames
= 512000
= 200
# -----------------------------------------------------------------------------
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
= ['std::dbg']
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
= [
{ = "egui_extras::TableBody::row", = "`row` doesn't scale. Use `rows` instead." },
{ = "glam::Vec2::normalize", = "normalize() can create NaNs. Use try_normalize or normalize_or_zero" },
{ = "glam::Vec3::normalize", = "normalize() can create NaNs. Use try_normalize or normalize_or_zero" },
{ = "std::env::temp_dir", = "Use the tempdir crate instead" },
{ = "std::panic::catch_unwind", = "We compile with `panic = 'abort'`" },
{ = "std::thread::spawn", = "Use `std::thread::Builder` and name the thread" },
# There are many things that aren't allowed on wasm,
# but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406)
# so we do that in `scripts/clippy_wasm/clippy.toml` instead.
]
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
= []
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types
= [
{ = "ring::digest::SHA1_FOR_LEGACY_USE_ONLY", = "SHA1 is cryptographically broken" },
{ = "std::sync::Condvar", = "Use parking_lot instead" },
{ = "std::sync::Mutex", = "Use parking_lot instead" },
{ = "std::sync::RwLock", = "Use parking_lot instead" },
# "std::sync::Once", # enabled for now as the `log_once` macro uses it internally
]
# Allow-list of words for markdown in docstrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= [
# You must also update the same list in `scripts/clippy_wasm/clippy.toml`!
"GitHub",
"GLB",
"GLTF",
"iOS",
"macOS",
"NaN",
"OBJ",
"OpenGL",
"PyPI",
"sRGB",
"sRGBA",
"WebGL",
"WebSocket",
"WebSockets",
]