From a641cfb3a75570ce85496f0d72f840582b258fec Mon Sep 17 00:00:00 2001 From: Julian Hofer Date: Tue, 3 Dec 2024 15:15:36 +0100 Subject: [PATCH] Disallow usage of `fs` API via clippy --- clippy.toml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/clippy.toml b/clippy.toml index 8e85afba9..a981538f3 100644 --- a/clippy.toml +++ b/clippy.toml @@ -5,3 +5,31 @@ ignore-interior-mutability = [ "pixi::project::environment::Environment", "pixi::project::solve_group::SolveGroup", ] + +disallowed-types = [ + "std::fs::DirEntry", + "std::fs::File", + "std::fs::OpenOptions", + "std::fs::ReadDir", +] + +disallowed-methods = [ + "std::fs::canonicalize", + "std::fs::copy", + "std::fs::create_dir", + "std::fs::create_dir_all", + "std::fs::hard_link", + "std::fs::metadata", + "std::fs::read", + "std::fs::read_dir", + "std::fs::read_link", + "std::fs::read_to_string", + "std::fs::remove_dir", + "std::fs::remove_dir_all", + "std::fs::remove_file", + "std::fs::rename", + "std::fs::set_permissions", + "std::fs::soft_link", + "std::fs::symlink_metadata", + "std::fs::write", +]