|
| 1 | +# Clippy configuration for non-vite crates (fspy_*, subprocess_test, vite_pty, etc.) |
| 2 | +# that don't depend on vite_str/vite_path. |
| 3 | +# |
| 4 | +# This is a subset of the root .clippy.toml, with rules recommending vite_str/vite_path |
| 5 | +# alternatives removed. Generic rules (cow_utils, rustc-hash) still apply. |
| 6 | +# |
| 7 | +# To use: symlink as `.clippy.toml` in the crate's directory: |
| 8 | +# ln -s ../../.non-vite.clippy.toml .clippy.toml |
| 9 | + |
| 10 | +avoid-breaking-exported-api = false |
| 11 | + |
| 12 | +disallowed-methods = [ |
| 13 | + { path = "str::to_ascii_lowercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_ascii_lowercase` instead." }, |
| 14 | + { path = "str::to_ascii_uppercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_ascii_uppercase` instead." }, |
| 15 | + { path = "str::to_lowercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_lowercase` instead." }, |
| 16 | + { path = "str::to_uppercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_uppercase` instead." }, |
| 17 | + { path = "str::replace", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replace` instead." }, |
| 18 | + { path = "str::replacen", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replacen` instead." }, |
| 19 | +] |
| 20 | + |
| 21 | +disallowed-types = [ |
| 22 | + { path = "std::collections::HashMap", reason = "Use `rustc_hash::FxHashMap` instead, which is typically faster." }, |
| 23 | + { path = "std::collections::HashSet", reason = "Use `rustc_hash::FxHashSet` instead, which is typically faster." }, |
| 24 | +] |
0 commit comments