astral-sh/ruff

TD003 error in regex or misleading error message

Open

#16.519 geöffnet am 5. März 2025

Auf GitHub ansehen
 (7 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)Rust (2.088 Forks)batch import
documentationhelp wantedrule

Repository-Metriken

Stars
 (47.527 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 8h) (573 gemergte PRs in 30 T)

Beschreibung

Summary

Rule TD0003 ('Missing issue link for this TODO') allows for 4 different forms off issue link, however only explicit link and #123 works anywhere in the TODO comment, 123 and FOOBAR-1234 have to be put alone in the separate line.

  1. While it may be reasonable for digits alone version I think it would be much more convenient to search for FOOBAR-1234 form in the whole TODO comment.
  2. This difference in behavior is not stated anywhere clearly, nor in the error message neither in ruff docs (it can be only inferred form the examples) which is very confusing for the user.

Version

0.9.3

Contributor Guide