tool-sync icon indicating copy to clipboard operation
tool-sync copied to clipboard

Adding lint options to prevent stray debug println

Open MitchellBerend opened this issue 2 years ago • 1 comments

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 avatar Oct 27 '22 08:10 MitchellBerend

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() {}

MitchellBerend avatar Oct 27 '22 09:10 MitchellBerend