New Lint: Warn dbg!() macro use #3721
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-unnecessary
Lint: Warn about unnecessary code
T-macros
Type: Issues with macros and macro expansion
At Rust v1.32,
dbg!
macro was added.https://doc.rust-lang.org/std/macro.dbg.html
This macro is supposed to be used for print debugging. So it should not be contained in final code (e.g. when
git commit
).From doc, it says:
I want to suggest to make clippy warn
dbg!()
macro use in code.As related works, eslint, most popular linter for JavaScript, has rule
no-console
which prevents use ofconsole.log
.https://eslint.org/docs/rules/no-console
The text was updated successfully, but these errors were encountered: