Skip to content

Commit c8cf99e

Browse files
committed
ci: add linter rule to deny dbg! outside tests
1 parent d231b87 commit c8cf99e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ gethostname = "1.1.0"
4949
mockito = "1.7.2"
5050
testcontainers-modules = { version = "0.14.0", features = ["redis"] }
5151

52-
5352
[build-dependencies]
5453
prost-build = "0.14.3"
5554
which = "8.0.0"
5655
bindgen = "0.72.1"
5756
aws-lc-rs = { version = "1", features = [
5857
"bindgen",
5958
] } # This is a workaround for failing builds on arm. See: https://github.com/rustls/rustls/issues/1788
59+
60+
[lints.clippy]
61+
dbg_macro = "deny"

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ fn main() -> Result<()> {
1414
println!("Auto-fetching of protoc is only intended for use in CI, install it manually.")
1515
} else {
1616
let res = Command::new("sudo").arg("apt-get").arg("update").output();
17-
dbg!(&res);
17+
println!("{:?}", &res);
1818
if res.is_err() {};
1919
let res = Command::new("sudo")
2020
.arg("apt-get")
2121
.arg("install")
2222
.arg("protobuf-compiler")
2323
.output();
24-
dbg!(&res);
24+
println!("{:?}", &res);
2525
if res.is_err() {};
2626
}
2727
};

clippy.toml

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

0 commit comments

Comments
 (0)