Repository navigation
Expand file tree
/
Copy pathclippy.toml
More file actions
39 lines (37 loc) · 2.12 KB
/
Copy pathclippy.toml
File metadata and controls
39 lines (37 loc) · 2.12 KB
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
# `fs_err` mirrors `std::fs` and names the path and the operation in the error,
# where the standard library reports the OS text alone. `AppError::Io` carries
# that message to a user, so a bare `std::fs` call is a message with no path in
# it. The edit per module is `use fs_err as fs;`.
disallowed-methods = [
{ path = "std::fs::canonicalize", reason = "use fs_err" },
{ path = "std::fs::copy", reason = "use fs_err" },
{ path = "std::fs::create_dir", reason = "use fs_err" },
{ path = "std::fs::create_dir_all", reason = "use fs_err" },
{ path = "std::fs::exists", reason = "use fs_err" },
{ path = "std::fs::hard_link", reason = "use fs_err" },
{ path = "std::fs::metadata", reason = "use fs_err" },
{ path = "std::fs::read", reason = "use fs_err" },
{ path = "std::fs::read_dir", reason = "use fs_err" },
{ path = "std::fs::read_link", reason = "use fs_err" },
{ path = "std::fs::read_to_string", reason = "use fs_err" },
{ path = "std::fs::remove_dir", reason = "use fs_err" },
{ path = "std::fs::remove_dir_all", reason = "use fs_err" },
{ path = "std::fs::remove_file", reason = "use fs_err" },
{ path = "std::fs::rename", reason = "use fs_err" },
{ path = "std::fs::set_permissions", reason = "use fs_err" },
{ path = "std::fs::soft_link", reason = "use fs_err" },
{ path = "std::fs::symlink_metadata", reason = "use fs_err" },
{ path = "std::fs::write", reason = "use fs_err" },
# `Path` reaches the same syscalls by another name. `Path::exists` is absent
# because it answers with a `bool` and has no error to lose.
{ path = "std::path::Path::canonicalize", reason = "use fs_err" },
{ path = "std::path::Path::metadata", reason = "use fs_err" },
{ path = "std::path::Path::read_dir", reason = "use fs_err" },
{ path = "std::path::Path::read_link", reason = "use fs_err" },
{ path = "std::path::Path::symlink_metadata", reason = "use fs_err" },
{ path = "std::path::Path::try_exists", reason = "use fs_err" },
]
disallowed-types = [
{ path = "std::fs::File", reason = "use fs_err" },
{ path = "std::fs::OpenOptions", reason = "use fs_err" },
]