Skip to content

Commit a2ab1dc

Browse files
committed
lint: use clippy instead of hand-written no_printlns/no_dbgs
1 parent 70a33df commit a2ab1dc

File tree

17 files changed

+33
-60
lines changed

17 files changed

+33
-60
lines changed

.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
allow-print-in-tests = true

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,13 @@ name = "uiua"
169169
[workspace]
170170
members = ["site", "tests_ffi", "pad/editor", "parser"]
171171

172+
[workspace.lints.clippy]
173+
print_stdout = "warn"
174+
print_stderr = "allow"
175+
dbg_macro = "warn"
176+
177+
[lints]
178+
workspace = true
179+
172180
[profile.dev]
173181
incremental = true

pad/editor/.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.clippy.toml

pad/editor/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ edition = "2021"
66
[lib]
77
crate-type = ["cdylib", "rlib"]
88

9+
[lints]
10+
workspace = true
11+
912
[dependencies]
1013
leptos = { version = "0.6.10", features = ["csr"] }
1114
js-sys = "0.3.69"

parser/.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.clippy.toml

parser/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ repository = "https://github.com/uiua-lang/uiua"
1010
rust-version = "1.82.0"
1111
version = "0.17.0-dev.1"
1212

13+
[lints]
14+
workspace = true
15+
1316
[dependencies]
1417
bytemuck = {version = "1.17", features = ["must_cast", "derive", "extern_crate_alloc"]}
1518
colored = "2"

site/.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.clippy.toml

site/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ edition = "2021"
33
name = "site"
44
version = "0.1.0"
55

6+
[lints]
7+
workspace = true
8+
69
[dependencies]
710
base64 = "0.22.0"
811
comrak = "0.39.0"

src/compile/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,6 +2610,7 @@ impl Compiler {
26102610
let inputs = self.asm.inputs.clone();
26112611
self.emit_diagnostic_impl(Diagnostic::new(message.into(), span, kind, inputs));
26122612
}
2613+
#[allow(clippy::print_stdout)]
26132614
fn emit_diagnostic_impl(&mut self, diagnostic: Diagnostic) {
26142615
if self.print_diagnostics {
26152616
eprintln!("{}", diagnostic.report());

src/ffi.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ use std::{
33
str::FromStr,
44
};
55

6-
#[allow(missing_docs)]
7-
pub const DEBUG: bool = false;
8-
96
/// Data for how to send an argument type to `&ffi`
107
#[derive(Debug)]
118
pub struct FfiArg {

0 commit comments

Comments
 (0)