Nested tool lints

Based on tool lints and nested imports I just had a thought (inspired by an u.rl.o post) that it could make sense to allow nested lint names, i.e. allow

#![allow(clippy::{
    almost_swapped,
    approx_constant,
})]

as meaning the equivalent of

#![allow(
    clippy::almost_swapped,
    clippy::approx_constant,
)]

I was wondering if anyone has examples where this would make a significant difference? Is referring to multiple Clippy lints common enough to make RFC-ing this worthwhile?

(The same could be done for tool attributes, but I don’t know of any tool attributes in use currently).

6 Likes

My first impression is that this seems like a small and reasonable extension…

cc @petrochenkov

I’d appreciate this since I rely heavily on many Clippy lints.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.