Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support task-tags in flake8-todo rules #11278

Open
benblank opened this issue May 4, 2024 · 2 comments
Open

Support task-tags in flake8-todo rules #11278

benblank opened this issue May 4, 2024 · 2 comments
Labels
configuration Related to settings and configuration

Comments

@benblank
Copy link

benblank commented May 4, 2024

It would be nice if the flake8-todo rules affecting TODO formatting (TD002-7) supported the lint.task-tags setting rather than just the hard-coded "directives" supported by the original rules in flake8-todo. As it stands, there's no way to add enforcement for custom tags, which would be helpful for teams which use them and want to make sure they're used consistently. It also "incorrectly" flags my maybe-todo comments (e.g. # TODO?: switch to using fooble instead) as missing a colon. 🙂

@charliermarsh charliermarsh added the configuration Related to settings and configuration label May 4, 2024
@charliermarsh
Copy link
Member

Do you mean that TD001 should flag tags other than FIXME and XXX? (https://docs.astral.sh/ruff/rules/invalid-todo-tag/)

Or that rules like TD002 should allow anything in task-tags (e.g., FIXME(foo) should be ok?), and enforce authorship on them? (https://docs.astral.sh/ruff/rules/missing-todo-author/)

@charliermarsh charliermarsh added the question Asking for support or clarification label May 4, 2024
@benblank
Copy link
Author

benblank commented May 5, 2024

Ah! You're right, TD001 doesn't make sense that way; my mistake, I'll fix the description.

No, I was indeed referring to e.g. being able to require # TECHDEBT(author) instead of just # TECHDEBT if TD002 is selected or, in my case, # TODO?: some rationale instead of just # TODO? with TD004, TD005, and TD007.

I think being able to keep track of when task tags are being used inconsistently would be a "nice to have" feature for projects which use multiple tags with different meanings.

@charliermarsh charliermarsh removed the question Asking for support or clarification label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration
Projects
None yet
Development

No branches or pull requests

2 participants