DrString icon indicating copy to clipboard operation
DrString copied to clipboard

`//` in continuation lines aren't reported as problems

Open dduan opened this issue 6 years ago • 1 comments

/// blah blah blah
// <- notice how there are 2 `/`s

This should be a problem and be autoformattable.

dduan avatar Dec 20 '19 22:12 dduan

Huh, I hadn't considered this as a possibility. The contract for how to interpret discontiguous doc comment lines seems under-specified, and now that's got me thinking about what the right way to handle it would be...

If it's a typo, then we'd ideally want to auto-correct, or maybe just generate a warning.

What if it was intentional, though? A normal comment between doc comments has the same effect as commenting out code, so someone could use this as a clever way to annotate doc comments. In that case, I think any attempt to resituate it would be destructive.

mattt avatar Jan 30 '20 00:01 mattt