Skip to content

Commit

Permalink
Merge pull request #160 from Alexhuszagh/deny_lint
Browse files Browse the repository at this point in the history
Disallow I/O methods via clippy.
  • Loading branch information
Alexhuszagh authored Sep 21, 2024
2 parents 4ca3cdc + 0d88411 commit c102122
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
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

0 comments on commit c102122

Please sign in to comment.