-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-lintArea: New lintsArea: New lints
Description
What it does
it sorts function arguments alphabetically
Advantage
makes it easier to find the argument I'm looking for in the function. Especially useful when I follow the path taken by some variable through the various functions/methods in the program. Or if I just wanna get a high-level overview of which info is passed to the given function without having to worry if I might have missed something. Thus it helps save time.
Drawbacks
idk
Example
fn function(
d: String,
b: String,
h: String,
g: String,
e: String,
f: String,
c: String,
a: String,
) {
println!("{a}, {b}, {c}, {d}, {e}, {f}, {g}, {h}");
}Could be written as:
fn function(
a: String,
b: String,
c: String,
d: String,
e: String,
f: String,
g: String,
h: String,
) {
println!("{a}, {b}, {c}, {d}, {e}, {f}, {g}, {h}");
}Comparison with existing lints
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lints