Spaces:
Running
on
Zero
Running
on
Zero
File size: 3,205 Bytes
344c16f |
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 |
# Copied from https://github.com/rerun-io/rerun_template
# This is used by the CI so we can forbid some methods that are not available in wasm.
#
# We cannot forbid all these methods in the main `clippy.toml` because of
# https://github.com/rust-lang/rust-clippy/issues/10406
# -----------------------------------------------------------------------------
# Section identical to the main clippy.toml:
msrv = "1.76"
allow-unwrap-in-tests = true
# https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#avoid-breaking-exported-api
# We want suggestions, even if it changes public API.
avoid-breaking-exported-api = false
excessive-nesting-threshold = 8
max-fn-params-bools = 1
# https://rust-lang.github.io/rust-clippy/master/index.html#/large_include_file
max-include-file-size = 1000000
too-many-lines-threshold = 200
# -----------------------------------------------------------------------------
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
disallowed-methods = [
{ path = "crossbeam::channel::Receiver::into_iter", reason = "Cannot block on Web" },
{ path = "crossbeam::channel::Receiver::iter", reason = "Cannot block on Web" },
{ path = "crossbeam::channel::Receiver::recv_timeout", reason = "Cannot block on Web" },
{ path = "crossbeam::channel::Receiver::recv", reason = "Cannot block on Web" },
{ path = "poll_promise::Promise::block_and_take", reason = "Cannot block on Web" },
{ path = "poll_promise::Promise::block_until_ready_mut", reason = "Cannot block on Web" },
{ path = "poll_promise::Promise::block_until_ready", reason = "Cannot block on Web" },
{ path = "rayon::spawn", reason = "Cannot spawn threads on wasm" },
{ path = "std::sync::mpsc::Receiver::into_iter", reason = "Cannot block on Web" },
{ path = "std::sync::mpsc::Receiver::iter", reason = "Cannot block on Web" },
{ path = "std::sync::mpsc::Receiver::recv_timeout", reason = "Cannot block on Web" },
{ path = "std::sync::mpsc::Receiver::recv", reason = "Cannot block on Web" },
{ path = "std::thread::spawn", reason = "Cannot spawn threads on wasm" },
{ path = "std::time::Duration::elapsed", reason = "use `web-time` crate instead for wasm/web compatibility" },
{ path = "std::time::Instant::now", reason = "use `web-time` crate instead for wasm/web compatibility" },
{ path = "std::time::SystemTime::now", reason = "use `web-time` or `time` crates instead for wasm/web compatibility" },
]
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types
disallowed-types = [
{ path = "instant::SystemTime", reason = "Known bugs. Use web-time." },
{ path = "std::thread::Builder", reason = "Cannot spawn threads on wasm" },
# { path = "std::path::PathBuf", reason = "Can't read/write files on web" }, // Used in build.rs files (which is fine).
]
# Allow-list of words for markdown in dosctrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
doc-valid-idents = [
# You must also update the same list in the root `clippy.toml`!
"..",
"GitHub",
"GLB",
"GLTF",
"iOS",
"macOS",
"NaN",
"OBJ",
"OpenGL",
"PyPI",
"sRGB",
"sRGBA",
"WebGL",
"WebSocket",
"WebSockets",
]
|