Generated catalog · 62 rules
Rust Doctor rules
Read from rust-doctor rules list --json, so this page states what the tool checks rather than what it once checked. Every rule ships at warn; raising or dropping one is your policy decision.
Security
6 rules- clippy::permissions_set_readonly_false Set explicit Unix permission bits instead of clearing readonly on Unix. Clippy · P1 · warn
- rust_doctor::cargo::unpinned_git_dependency Set rev to the full 40-character commit SHA intended by the project. Cargo health · P1 · warn
- rust_doctor::repo::hardcoded_credential Remove the credential from the source and rotate it; the closed list judged here is AKIA, ghp_, github_pat_, sk-, xoxb- and BEGIN PRIVATE KEY blocks, and the matched value is never republished by the report. Repository · P1 · warn
- rust_doctor::repo::tracked_secret_file Remove the file from version control with git rm --cached, rotate what it contains, and add its name to .gitignore so it stays out; the report names the path and never its contents. Repository · P1 · warn
- rust_doctor::source::disabled_tls_verification Keep TLS verification enabled and configure the required trust roots or server name instead. Source kernel · P0 · warn
- rust_doctor::source::dynamic_shell_command Avoid the shell and pass values as separate Command arguments; otherwise apply shell-specific escaping at the trust boundary. Source kernel · P0 · warn
Correctness
11 rules- clippy::arc_with_non_send_sync Use Rc for single-threaded sharing, or make the inner value Send and Sync before sharing it across threads. Clippy · P1 · warn
- clippy::await_holding_lock Drop the guard before the await point, or use a lock designed to be held across await. Clippy · P1 · warn
- clippy::await_holding_refcell_ref Copy the borrowed value and drop the borrow before the await point. Clippy · P1 · warn
- clippy::mut_mutex_lock Use get_mut when the mutex is already exclusively borrowed; locking it again can deadlock. Clippy · P2 · warn
- clippy::non_send_fields_in_send_ty Remove the unsafe Send implementation or ensure every field is safe to send between threads. Clippy · P1 · warn
- clippy::panic_in_result_fn A function that already returns Result should report the failure as Err instead of panicking. Clippy · P2 · warn
- clippy::rc_mutex Use RefCell inside Rc for single-threaded sharing, or Arc<Mutex<T>> when the value really crosses threads. Clippy · P2 · warn
- clippy::suspicious_command_arg_space Pass each process argument separately instead of embedding spaces in one argument. Clippy · P2 · warn
- clippy::todo Replace todo! with the intended implementation or remove the reachable placeholder. Clippy · P2 · warn
- clippy::unimplemented Implement this code path or remove the reachable placeholder. Clippy · P1 · warn
- clippy::unreachable Make the remaining case explicit or return an error; an unreachable! that is reached aborts the process. Clippy · P2 · warn
Reliability
14 rules- clippy::exit Return an error to the caller and let the entry point decide the exit status. Clippy · P2 · warn
- clippy::expect_used Propagate the error with ? or handle the missing value explicitly instead of panicking. Clippy · P3 · warn
- clippy::indexing_slicing Use get or get_mut and handle the absent element instead of indexing, which panics out of bounds. Clippy · P3 · warn
- clippy::mem_forget Avoid leaking a value with drop semantics; use an explicit ownership or lifetime strategy. Clippy · P2 · warn
- clippy::panic Return an error instead of aborting the process on an input the caller can recover from. Clippy · P3 · warn
- clippy::string_slice Use get on the string range and handle the absent slice; byte indexing panics inside a UTF-8 character. Clippy · P3 · warn
- clippy::unwrap_used Propagate the error with ? or provide a default instead of panicking on the absent value. Clippy · P3 · warn
- clippy::zombie_processes Wait on the child process or otherwise reap it before the handle is dropped. Clippy · P2 · warn
- rust_doctor::cargo::permissive_lint_table Remove the allow entry from [lints] and fix what it silences; a manifest-level allow hides the rule from every scan of this workspace. Cargo health · P2 · warn
- rust_doctor::cargo::permissive_rustflags Remove the flag from .cargo/config.toml and fix what it silences; the closed list judged here is --cap-lints allow, -A warnings and -C overflow-checks=off, each of which disables a check for every build of this workspace. Cargo health · P2 · warn
- rust_doctor::cargo::release_debug_symbols Set strip = "symbols" or remove debug from [profile.release]: full debug info ships absolute build paths inside the binary. Only [profile.release] itself is judged; profiles inheriting from it are not resolved. Cargo health · P3 · warn
- rust_doctor::cargo::unbounded_registry_dependency Replace the unbounded version requirement with the minimum compatible version intended by the project. Cargo health · P3 · warn
- rust_doctor::cargo::unchecked_release_overflow Set overflow-checks = true under [profile.release] so integer overflow panics instead of wrapping silently; the measured cost is a few percent on integer-heavy code, which is the tradeoff this finding asks you to decide. Cargo health · P3 · warn
- rust_doctor::structure::crate_level_allow Scope the allow to the item that needs it; a file-wide or module-wide exemption, reasoned or not, also silences every future finding in its reach. Structure · P2 · warn
Performance
10 rules- clippy::format_collect Write into one String with write! or push_str instead of allocating one String per item. Clippy · P3 · warn
- clippy::large_types_passed_by_value Pass the large value by reference to avoid copying it at every call. Clippy · P3 · warn
- clippy::manual_memcpy Use copy_from_slice or clone_from_slice instead of copying element by element. Clippy · P3 · warn
- clippy::ptr_arg Take &[T] or &str so callers can pass any borrowed slice without owning one first. Clippy · P3 · warn
- clippy::rc_buffer Share the slice itself with Rc<str> or Rc<[T]> instead of wrapping an owned buffer. Clippy · P3 · warn
- clippy::redundant_allocation Remove the inner allocation; one pointer indirection is enough. Clippy · P2 · warn
- clippy::stable_sort_primitive Use sort_unstable on primitives; stability carries no meaning and costs an allocation. Clippy · P3 · warn
- clippy::unnecessary_to_owned Pass the borrowed value directly; the callee never needs the owned copy. Clippy · P3 · warn
- clippy::useless_vec Use an array or a slice literal; this value never needs a heap allocation. Clippy · P3 · warn
- clippy::vec_init_then_push Build the vector with the vec! literal so it is allocated once at its final size. Clippy · P3 · warn
Dependencies
5 rules- rust_doctor::cargo::duplicate_major_versions Align the requirements so one major version of the crate is resolved; duplicates ship twice and their types do not interoperate. Cargo health · P2 · warn
- rust_doctor::cargo::missing_lockfile Commit Cargo.lock next to the manifest so every build of this binary resolves the same dependency versions. Cargo health · P2 · warn
- rust_doctor::cargo::path_dependency_outside_workspace Vendor the crate inside the workspace or publish it; a path leaving the workspace only resolves on the author's machine. Cargo health · P1 · warn
- rust_doctor::cargo::test_only_dependency Move the entry to [dev-dependencies]: only the test suite references it, and every consumer of the library compiles it anyway. Cargo health · P2 · warn
- rust_doctor::cargo::unused_dependency Remove the entry no source references, or switch this rule off with --rule or rust-doctor.toml for a crate needed for linking alone; references made only through macro expansion or doctests are not seen. Cargo health · P2 · warn
Maintainability
16 rules- clippy::dbg_macro Remove dbg! or replace it with intentional logging. Clippy · P3 · warn
- clippy::missing_safety_doc Document in a `# Safety` section the invariants the caller must uphold before calling. Clippy · P3 · warn
- clippy::print_stderr Write to a caller-provided writer or a logger instead of hard-wiring stderr. Clippy · P3 · warn
- clippy::print_stdout Write to a caller-provided writer or a logger instead of hard-wiring stdout. Clippy · P3 · warn
- clippy::too_many_arguments Group the related parameters into a struct so the signature names what it takes. Clippy · P3 · warn
- clippy::type_complexity Name the nested type with a type alias or a dedicated struct so signatures say what they carry. Clippy · P3 · warn
- clippy::unused_async Remove the async marker, or await the work the function was meant to drive. Clippy · P3 · warn
- rust_doctor::repo::unignored_build_output Add the target directory to .gitignore so build artifacts stay out of the repository; the directory judged is Cargo's, including a custom target-dir set in .cargo/config.toml, and any ignore source git honors counts. Repository · P3 · warn
- rust_doctor::structure::complex_function Split the branching into smaller functions, or flatten it with early returns, so one reading holds the whole path. Structure · P3 · warn
- rust_doctor::structure::duplicate_function_body Keep one definition and call it from the other sites, or make what differs between them a parameter. Structure · P3 · warn
- rust_doctor::structure::near_duplicate_function_body Factor the shared shape into one function and pass what differs, or keep both and record why they must stay apart. Structure · P3 · warn
- rust_doctor::structure::orphan_module_file Declare the file with a mod declaration, or delete it: Cargo compiles no file the module tree does not reach. Structure · P3 · warn
- rust_doctor::structure::oversized_unit Split the file, function, impl block or module along its responsibilities before growth makes the split harder. Structure · P3 · warn
- rust_doctor::structure::stacked_allow_attribute Keep the one exemption the item actually needs and fix what the others hide; attributes produced by cfg_attr are not counted here. Structure · P3 · warn
- rust_doctor::structure::unreasoned_allow_attribute Fix what the lint reports, or keep the allow and state why with reason = "..." so the exemption survives review. Structure · P3 · warn
- rust_doctor::structure::unreferenced_feature Delete the feature nothing reads, or declare the one a cfg already gates; switch this rule off for a stub deliberately kept as published surface. Structure · P3 · warn