Lint explanation
Detect use statements that are separated with empty lines, and suggest removing them. The reasoning is that imports that don't have empty lines between them are nicely sorted by rustfmt in an alphabetical order.
This does apply to use statements with different visibility.
This lint is rather subjective and should be opt-in.
Example code
Bad
use std::path::Path;
use serde::Deserialize;
Good
use serde::Deserialize;
use std::path::Path;
Notes
marker must have the ability to provide information about whitespace in code to lints to implement this. I know it is not obvious what AST nodes whitespace (just like comments) should be nested under, but this is not very important. Rust-analyzer, for example has a lossless AST, and it attaches the leading whitespace to AST nodes (more details in rust-marker/marker#189 (comment)).
Lint explanation
Detect
usestatements that are separated with empty lines, and suggest removing them. The reasoning is that imports that don't have empty lines between them are nicely sorted byrustfmtin an alphabetical order.This does apply to
usestatements with different visibility.This lint is rather subjective and should be opt-in.
Example code
Bad
Good
Notes
markermust have the ability to provide information about whitespace in code to lints to implement this. I know it is not obvious what AST nodes whitespace (just like comments) should be nested under, but this is not very important. Rust-analyzer, for example has a lossless AST, and it attaches the leading whitespace to AST nodes (more details in rust-marker/marker#189 (comment)).