Module tidy::alphabetical
source · Expand description
Checks that a list of items is in alphabetical order
To use, use the following annotation in the code:
// tidy-alphabetical-start
fn aaa() {}
fn eee() {}
fn z() {}
// tidy-alphabetical-end
The following lines are ignored:
- Lines that are indented with more or less spaces than the first line
- Lines starting with
//
,#[
,)
,]
,}
if the comment has the same indentation as the first line
If a line ends with an opening bracket, the line is ignored and the next line will have its extra indentation ignored.