Skip to content

Commit

Permalink
Lint against leftover dbg/todo macros only in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Dec 6, 2023
1 parent 8582d28 commit 301ad8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ rustflags = [
# 📎 Lints that are enabled (warn/deny) by default
"-Wclippy::all",
# Restriction (optional, neutral lints)
"-Wclippy::dbg_macro", # Lint against leftover `dbg!` macros
"-Wclippy::todo", # Lint against leftover `todo!` macros
"-Wclippy::exit", # Prefer not `process::exit`ing directly
"-Wclippy::rest_pat_in_fully_bound_structs", # Prefer not to use `..` in fully bound structs
"-Wclippy::verbose_file_reads", # Prefer simpler and more concise `fs::read_to_string`
Expand Down
8 changes: 7 additions & 1 deletion crates/infra/utils/src/cargo/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ impl CargoWorkspace {
"--config",
format!(
"build.rustflags = {rustflags}",
rustflags = serde_json::to_string(&["--deny", "warnings"])?,
rustflags = serde_json::to_string(&[
"--deny",
"warnings",
// Lint against leftover `dbg/todo!` macros in CI:
"-Wclippy::dbg_macro",
"-Wclippy::todo"
])?,
),
);
}
Expand Down

0 comments on commit 301ad8e

Please sign in to comment.