no-single-line-block-comment
What it does
Section titled “What it does”Reports a block comment that fits on one line and ends its line (/* text */): it is written as a line comment. Documentation comments (/**), empty comments, comments with code after them on the same line and languages without a line comment marker are not reported. The fix turns it into a line comment.
Why it matters
Section titled “Why it matters”A line comment is the plain form for a short note. A block comment on one line is usually left over from a longer comment, and the next edit adds a second line inside it.
To fix, use // text; the fix does it.
Example
Section titled “Example”...}
/* one line */val a = 1...}
// one lineval a = 1Configuration
Section titled “Configuration”lint: rules: no-single-line-block-comment: warn # off (default), warn, errorEnabled by the presets: kotlin/ktlint.
Suppress one line with sudsy-disable-next-line no-single-line-block-comment in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ktlint | no-single-line-block-comment |
full |