Closed
Description
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:
Note that the macro is intended as a debugging tool and therefore you should avoid having uses of it in version control for longer periods. Use cases involving debug output that should be added to version control may be better served by macros such as debug! from the log crate.
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 of console.log
.