chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

Adding lint options to prevent stray debug println #156

Open MitchellBerend opened 1 year ago

MitchellBerend commented 1 year ago

This is a continuation of #148. The code snippet below can be added at the top ofsrc/lib.rs to prevent println! that are used for debugging purposes, from making it into the main branch.

#![deny(clippy::print_stdout)]

#[deny(clippy::print_stdout)]
mod completion;
#[deny(clippy::print_stdout)]
mod config;
#[deny(clippy::print_stdout)]
mod infra;
#[deny(clippy::print_stdout)]
mod install;
#[deny(clippy::print_stdout)]
mod model;
#[deny(clippy::print_stdout)]
mod sync;
MitchellBerend commented 1 year ago

For future reference, you can annotate your function or method with the following attribute so clippy passes ci:

#[allow(clippy::print_stdout)]
fn your_function() {}