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

todo-syntax false positives for substrings and lowercase #355

Closed
joaoscalett opened this issue Mar 30, 2016 · 1 comment
Closed

todo-syntax false positives for substrings and lowercase #355

joaoscalett opened this issue Mar 30, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@joaoscalett
Copy link

Comments with words partially containing the word "todo" are marked the todo-syntax error, even if it is not a TODO comment.

E.g. in a comment with the word Todorov (could be a name of a method, class, variable, etc.), the issue happens, and I have to either disable tailor on the comment or misspell the word. Which are both bad, since I want to keep tailor on, while I correctly spell the word in the comment.

I suggest assuming the todo-syntax mark only if there is a TODO word that, either:

  1. is NOT substring of another (like in "Todorov")
  2. is the first word of the comment
  3. is all in capital case.
@alykhank
Copy link
Member

alykhank commented Apr 3, 2016

Thanks for reporting @joaoscalett! Based on the original intent of this rule, we've decided to switch to only flagging comments that contain "todo" as isolated words when they are in an incorrect format (as you've suggested). However, we will still flag instances regardless of case and location of the word because we want to encourage the "preferred syntax" when TODO tasks are mentioned later in a comment or with different capitalization.

Thanks for your suggestions, the fix is forthcoming!

alykhank added a commit that referenced this issue Apr 3, 2016
#355: Only flag comments with TODO as independent word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants