dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.3k stars 1.59k forks source link

flutter_style_todos, allow multiple leading `// ` #59342

Open scheglov opened 1 year ago

scheglov commented 1 year ago

When we comment out code with existing // TODO(name): text, it becomes

//      // TODO(name): text
//      print(42);

This code reports the lint. I propose to allow multiple // or /// prefixes, or ignore multi-level single line comments in the lint.

pq commented 1 year ago

@hixie, @goderbauer: thoughts? Any other flutter folks who may want to weigh in?

goderbauer commented 1 year ago

+100 :)

I occasionally run into the same problem and wish it wouldn't report a lint there. Never got around to file a bug for it, though.

Hixie commented 1 year ago

i don't much care about this particular case since we'd never want that kind of code checked in anyway :-)