This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
[Feature request] format-comment
distinct between doc comments and in-code comments #1106
Closed
Description
What do you want to discuss?
I am using format-comment
as a rule and would like to make a distinction between doc-style comments with three slashes (///
) and simple in-code comments with two slashes (//
).
I tried to add an ignore rule like so:
- format-comment:
exclude:
- ^\/\/\s
But as the documentation describes, I believe that the slashes are removed from the input of the regex.
/// This is my very special class that requires a good sentence.
class Foo {
void bar() {
// first do something nice
hello();
// quick response
bye();
}
}
The simple comments inside the code can sometimes be a single word and I would be okay with ignoring those lines.
Only official documentation should be formatted.
Would it be possible to add an option for that?