dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
157 stars 44 forks source link

Convert TODOs to use URLs instead of issue numbers #1522

Open HosseinYousefi opened 2 months ago

HosseinYousefi commented 2 months ago

// TODO(#123) -> // TODO(https://github.com/dart-lang/native/issues/123)

HosseinYousefi commented 2 months ago

I want the TODOs to be unified everywhere 1. in this repo 2. in dart-lang org in general and 3. in dash

Flutter is already using https://dart.dev/tools/linter-rules/flutter_style_todos, should we use that as well? We were almost exclusively using issue numbers/urls up to this point. Do you prefer that style? If so I could create a dart_style_todos but I'm not sure if the rest of the team likes that.

@mosuem for insights about the ecosystem @dcharkes @liamappelbe

mosuem commented 2 months ago

There are multiple issues here:

  1. Using URLs instead of issue numbers
  2. Using a consistent style in TODOs
  3. Unifying TODOs in native/dart-lang/Dart+Flutter

I have no opinion on 1. For 2., I have not seen many problems arising from "malformatted" todos, but I am also not opposed to that. As for 3., maybe that discussion should happen in https://github.com/dart-lang/lints.

(Also // TODO(#123) -> // TODO(https://github.com/dart-lang/native/issues/123) does not match the Flutter style, FWIW)

HosseinYousefi commented 2 months ago

(Also // TODO(#123) -> // TODO(https://github.com/dart-lang/native/issues/123) does not match the Flutter style, FWIW)

I know. Hence the discussion.

There are multiple issues here:

The original issue is to use URLs instead of issue numbers. But I wanted to discuss a more general case before tackling this.

I wish we could have a custom lint for this repo for now before making it into a rule for all dart-lang/lints but that seems not to be possible as of now: https://github.com/dart-lang/sdk/issues/57588

dcharkes commented 2 months ago

I am opposed to adding usernames in TODOs. Because if people move on to another project they end all up orphaned. So preferably only issue links.

And yes please, full issue links. They are clickable, they survive migration to other repos etc.!

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

👍 This is what we use on dart-lang/sdk as well afaik.

consistent style

I'd love to have a lint. 👍