Skip to content

Commit ca5ffd1

Browse files
committed
lint: use clippy instead of hand-written no_printlns/no_dbgs
1 parent f524d9d commit ca5ffd1

File tree

21 files changed

+48
-72
lines changed

21 files changed

+48
-72
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/algebra.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub const DEBUG: bool = false;
1717
macro_rules! dbgln {
1818
($($arg:tt)*) => {
1919
if DEBUG {
20-
println!($($arg)*); // Allow println
20+
println!($($arg)*);
2121
}
2222
}
2323
}

src/compile/invert/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(crate) const DEBUG: bool = false;
3232
macro_rules! dbgln {
3333
($($arg:tt)*) => {
3434
if crate::compile::invert::DEBUG {
35-
println!($($arg)*); // Allow println
35+
println!($($arg)*);
3636
}
3737
}
3838
}

0 commit comments

Comments
 (0)