Please describe what the rule should do:
Should check for trailing comma for arguments, parameters, enum values and collections.
By default should warn in cases when items aren't on a single line.
Additionally should accept items count breakpoint config. For example, if breakpoint count is equal 2, then the rule should warn when items count is greater than or equal to the count or items aren't on a single line.
What category of rule is this? (place an "X" next to just one item)
[ ] Warns about a potential error (problem)
[X] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
Without config:
Bad:
void firstFunction(String arg1, String arg2,
String arg3) {
return;
}
Good:
void firstFunction(
String arg1,
String arg2,
String arg3,
) {
return;
}
With given config:
Bad:
void firstFunction(String arg1, String arg2,
String arg3) {
return;
}
void secondFunction(String arg1, String arg2, String arg3) {
return;
}
Good:
void firstFunction(
String arg1,
String arg2,
String arg3,
) {
return;
}
void secondFunction(
String arg1,
String arg2,
String arg3,
) {
return;
}
enum FirstEnum { firstItem }
const instance = FirstClass(
0,
0,
0,
);
Are you willing to submit a pull request to implement this rule?
Yes