Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding lint options to prevent stray debug println #156

Open
MitchellBerend opened this issue Oct 27, 2022 · 1 comment · May be fixed by #154
Open

Adding lint options to prevent stray debug println #156

MitchellBerend opened this issue Oct 27, 2022 · 1 comment · May be fixed by #154

Comments

@MitchellBerend
Copy link
Collaborator

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant