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(username):" pattern #27

Closed
burke opened this issue Jul 22, 2019 · 3 comments
Closed

"TODO(username):" pattern #27

burke opened this issue Jul 22, 2019 · 3 comments

Comments

@burke
Copy link
Member

burke commented Jul 22, 2019

Was talking through this the other day with the rest of the team. It sounds like smart_todo will try to interpret all TODO(*) comments, and this would conflict with the common "TODO(me):" pattern.

If that's correct, I think this is kind of unreasonable, but I don't have a suggestion for how this could be handled differently.

Anyway, here's a place for discussion about this conflict.

@Edouard-chin
Copy link
Contributor

👋 Thanks for opening the issue!

It sounds like smart_todo will try to interpret all TODO(*) comments

yeah that's correct it will try to parse all comment that starts with TODO(.
However, if the syntax inside the TODO() is not the one expected, it won't do anything.

Does writing TODO(me) creates a problem? It shouldn't

@burke
Copy link
Member Author

burke commented Jul 23, 2019

Nope that sounds great then, I just opened this without trying, but it does raise the opposite case... what if the user meant for a todo to be a smart todo but typo’d something? Will it silently not work? Sorry, I’ll just read the code.

@Edouard-chin
Copy link
Contributor

meant for a todo to be a smart todo but typo’d something? Will it silently not work?

Yes indeed it will silently fail. Though, if an app uses rubocop and activated the smart_todo_cop, malformated Smart Todo will be reported https://github.com/Shopify/smart_todo/wiki/Restrict-regular-TODO

@burke burke closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants