flutter-style-todos
Same as flutter_style_todos in Dart lints
- Group
- Style
- Path
lint/style/flutter-style-todos- Default
- Off, opt in
- Origin
- Dart lints
- Rule
- 237 of 512
Flags TODO comments that do not follow the Flutter style
// TODO(username): message, https://URL-to-issue.
A TODO names who can explain it and, ideally, links an issue. A line
comment starting with TODO (any case, any number of slashes) must read
// TODO(name): with a name made of letters, digits, -, and .:
// TODO: implement flagged
// todo(user) missing colon flagged
/// TODO(user): add docs flagged: doc comments are not TODOs
// TODO(user): implement, https://github.com/org/repo/issues/1
Invalid
// TODO: implement
// todo(user) missing colon
/// TODO(user): doc comments are not to-dos
//TODO implement
// TODO(): empty name
// ToDo(user):missing space
void main() {
// TODO(-user): name must start alphanumeric
}
int a = 1;
var s = '${a // TODO wrong
}'; // TODO: implement // TODO: implement // todo(user) missing colon // todo(user) missing colon /// TODO(user): doc comments are not to-dos /// TODO(user): doc comments are not to-dos //TODO implement //TODO implement // TODO(): empty name // TODO(): empty name // ToDo(user):missing spacevoid main() { // TODO(-user): name must start alphanumericint a = 1;var s = '${a // TODO wrongValid
// TODO(user): implement, https://github.com/org/repo/issues/1
// TODO(user.name-2): message
//TODO(u): no leading space is fine
// TODOS are not to-dos
/* TODO: block comments are not checked */
// A comment mentioning a TODO later on.
void main() {
// TODO(bob): handle errors
var s = '// TODO: inside a string';
print(s);
}Configure flutter-style-todos
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"flutter-style-todos": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/flutter-style-todos: <reason>More style rules
- format-comment
format-commentFlags comments that are not formatted as complete sentences.
- implicit-call-tearoffs
implicit_call_tearoffsExplicitly tear off callable objects' call methods.
- initializers-ordering
Requires field initializers to follow their containing type's field declaration order by default.
- leading-newlines-in-multiline-strings
leading_newlines_in_multiline_stringsFlags a multiline string spanning several lines whose text does not start with a line break right after the opening quotes.
- library-annotations
library_annotationsrecommendedRequires library-targeted metadata to attach to a
librarydirective. - library-names
library_namesrecommendedFlags a library name that is not
lowercase_with_underscores. - library-prefixes
library_prefixesrecommendedFlags import prefixes that are not
lower_case_with_underscores. - lines-longer-than-80-chars
lines_longer_than_80_charsFlags source lines longer than 80 characters.