astral-sh/ruff

TD003 error in regex or misleading error message

Open

#16,519 创建于 2025年3月5日

在 GitHub 查看
 (7 评论) (3 反应) (0 负责人)Rust (47,527 star) (2,088 fork)batch import
documentationhelp wantedrule

描述

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

贡献者指南

TD003 error in regex or misleading error message · astral-sh/ruff#16519 | Good First Issue