Skip to content

proposal: dart_style_todos #59539

Open
Open
@HosseinYousefi

Description

@HosseinYousefi

dart_style_todos

Similar to flutter_style_todos but for repos in dart-lang org.

People could not longer be working on a project and taking the original context of the TODO with them. Enforcing to have an accompanying link that explains the issue in full detail helps eliminate this problem.

Links are better than GitHub issue numbers:

  • They are clickable from more editors than issue numbers.
  • Sometimes the issue is not on GitHub.
  • Links survive migrations to the other repos.

Description

Use Dart TODO format: // TODO(https://URL-to-issue): message.

Details

TODOs should include the string TODO in all caps, followed by the link to the respective issue in parenthesis.

Kind

Style

Bad Examples

// TODO: xyz.
// TODO(name): xyz.
// TODO(#123): xyz.

Good Examples

// TODO(https://github.com/dart-lang/linter/issues/123): xyz.

Discussion

dart-lang/native#1522

@devoncarew @mosuem @pq We could add this lint to https://github.com/dart-lang/lints to be consistent everywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-status-pendingtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions