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

lints to disable in tests #12581

Open
ijackson opened this issue Mar 28, 2024 · 1 comment
Open

lints to disable in tests #12581

ijackson opened this issue Mar 28, 2024 · 1 comment
Labels
L-tests Lint: Lints test code

Comments

@ijackson
Copy link

Description

In Arti have things like the following:

#[cfg(test)]
mod test {
    // @@ begin test lint list maintained by maint/add_warning @@
    #![allow(clippy::bool_assert_comparison)]
    #![allow(clippy::clone_on_copy)]
    #![allow(clippy::dbg_macro)]
    #![allow(clippy::mixed_attributes_style)]
    #![allow(clippy::print_stderr)]
    #![allow(clippy::print_stdout)]
    #![allow(clippy::single_char_pattern)]
    #![allow(clippy::unwrap_used)]
    #![allow(clippy::unchecked_duration_subtraction)]
    #![allow(clippy::useless_vec)]
    #![allow(clippy::needless_pass_by_value)]
    //! <!-- @@ end test lint list maintained by maint/add_warning @@ -->
    // TODO add this next lint to maint/add_warning, for all tests
    #![allow(clippy::iter_overeager_cloned)]

Our maint/add_warning is a Python script that keeps the (currently) 236 copies of this lint block in sync across our 61 crates.

It would be nice if there were a way to systematically and centrally disable these lints for all our tests. Probably, many of them should be disabled by default.

(@llogiq suggested I should file this ticket)

Version

No response

Additional Labels

No response

@llogiq
Copy link
Contributor

llogiq commented Mar 28, 2024

Thank you!

@y21 y21 added the L-tests Lint: Lints test code label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-tests Lint: Lints test code
Projects
None yet
Development

No branches or pull requests

3 participants