Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow I/O methods via clippy. #160

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
avoid-breaking-exported-api = false
disallowed-macros = [
# Can also use an inline table with a `path` key.
{ path = "std::print", reason = "no IO allowed" },
{ path = "std::println", reason = "no IO allowed" },
{ path = "std::format", reason = "no string allocation allowed" },
{ path = "std::debug", reason = "debugging macros should not be present in any release" },
]
disallowed-methods = [
{ path = "std::io::stdout", reason = "no IO allowed" },
{ path = "std::io::stdin", reason = "no IO allowed" },
{ path = "std::io::stderr", reason = "no IO allowed" },
]
disallowed-types = [
{ path = "std::io::File", reason = "no IO allowed" },
{ path = "std::io::BufReader", reason = "need our own abstractions for reading/writing" },
{ path = "std::io::BufWriter", reason = "need our own abstractions for reading/writing" },
]
1 change: 0 additions & 1 deletion lexical-asm/clippy.toml

This file was deleted.

1 change: 1 addition & 0 deletions lexical-asm/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
avoid-breaking-exported-api = false
1 change: 0 additions & 1 deletion lexical-benchmark/clippy.toml

This file was deleted.

1 change: 1 addition & 0 deletions lexical-benchmark/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
avoid-breaking-exported-api = false
1 change: 0 additions & 1 deletion lexical-size/clippy.toml

This file was deleted.

1 change: 1 addition & 0 deletions lexical-size/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
avoid-breaking-exported-api = false