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 & FIXME #150

Closed
lfaoro opened this issue Oct 3, 2015 · 12 comments
Closed

TODO & FIXME #150

lfaoro opened this issue Oct 3, 2015 · 12 comments

Comments

@lfaoro
Copy link

lfaoro commented Oct 3, 2015

Why does the linter checks for TODO/FIXME statements? I thought you guys are using GitHub's Swift Style Guide as a guideline which has all rules explained.

If you add rules of your own, please document the reasoning behind it.

@keith
Copy link
Collaborator

keith commented Oct 3, 2015

If you'd like to disable this for your project you can add this to your .swiftlint.yml

disabled_rules:
  - todo

@keith
Copy link
Collaborator

keith commented Oct 3, 2015

Also the readme says:

loosely based on GitHub's Swift Style Guide

So I don't think it's a huge deal as more rules are added to SwiftLint. Especially since they can be easily disabled.

@lfaoro
Copy link
Author

lfaoro commented Oct 4, 2015

I know how to disable it, thank you though.
What I'd like to know is: Where is the reasoning behind this decision documented?

@jpsim
Copy link
Collaborator

jpsim commented Nov 17, 2015

What I'd like to know is: Where is the reasoning behind this decision documented?

I added that in because IMO the role of a linter is to show you the parts of your code that need your attention and ultimately need to be fixed. TODOs and FIXMEs are one way to do this.

@jpsim jpsim closed this as completed Nov 17, 2015
@isadon
Copy link
Contributor

isadon commented Feb 3, 2018

@jpsim I'm not sure I understand. Are you saying the reason for the warning is to actually show and bring the todo to your attention so that you may implement the actual todo? I ask because the warning given by swift-lint seems to be to not use TODO's.

@jpsim
Copy link
Collaborator

jpsim commented Feb 3, 2018

Yes.

@isadon
Copy link
Contributor

isadon commented Feb 3, 2018

@jpsim The message given by Swift lint does not imply that though:

SwiftLint displays: "Todo Violation: TODOs should be avoided...."

@jpsim
Copy link
Collaborator

jpsim commented Feb 3, 2018

If you have an improvement in mind, feel free to file a PR.

@isadon
Copy link
Contributor

isadon commented Feb 3, 2018

@jpsill Will do!

@sbohmann
Copy link

sbohmann commented Feb 24, 2018

I also first thought that it discourages using TODOs but it actually encourages them by supporting them and making them more useful through this rule :D Maybe the message should be changed to "consider doing / fixing what the TODO suggests", though ^^

@isadon
Copy link
Contributor

isadon commented Feb 26, 2018

Pull Request #2069 has been added to fix this issue.

@Andy0570
Copy link

The author's intent in adding todo to lint is that code or functionality annotated via TODO or FIXME should be refined or implemented, so by way of a warning you are reminded that there is unfinished functionality in your project.

If you want to suppress this warning, you can turn off this rule, which is on by default, in disabled_rules, and you can also use 'notaTODO' and 'notaFIXME' instead;

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

6 participants