Open sindresorhus opened 5 years ago
PS: we already have a rule for MARK
@marcelofabri Should markrule be expanded to also account for todo's and renamed? That seems to make more sense than having a todorule, markrule, and todoformatting rule, for instance.
I personally think that having another rule is easier for users as it gives them more choices (which rule to enable/disable, allow them to disable locally, etc)
New Issue Checklist
New rule request
I would like to ensure TODO comments are formatted properly.
It should also apply to
FIXME
comments. It could be useful forMARK
comments to, but then the rule needs a more generic name I think.It's important to format TODOs correctly for readability and for Xcode to parse it correctly.
TODO
. If this is left out, Xcode will not be able to parse it.// TODO Something
=>// TODO: Something
/* TODO Something */
=>/* TODO: Something */
/// TODO: Something
=>// TODO: Something
/** TODO: Something */
=>/* TODO: Something */
//
comment, one space after the//
and one space after the colon. For/* */
comment, one space after/*
and before*/
if it's inline.//TODO:Something
=>// TODO: Something
/*TODO:Something*/
=>/* TODO: Something */
//
for TODO comments and not/* */
.You should be able to opt into only allowing
//
for TODO comments.Enabled by default. I can't imagine anyone wanting
//TODO:Something
.