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

Rule Request: [todo] Extend todo rule to allow FIXME and TODO be separately chosen #5232

Closed
2 tasks done
grantneufeld opened this issue Sep 22, 2023 · 0 comments · Fixed by #5233
Closed
2 tasks done
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@grantneufeld
Copy link

New Issue Checklist

New rule request

Currently, the todo rule issues warnings for both TODO and FIXME comments. I would like to be able to configure the rule to only apply to one, or both, of those types of comment. (Specifically, in my case, I only want warnings for FIXME comments, and no warnings for TODO.)

  1. Why should this rule be added?

Currently, in order to have SwiftLint produce warnings for one of the types of comments, we have to have warnings issued for both—even in the case where we do not want warnings on the the second type.

  1. Provide several examples of what would and wouldn't trigger violations.

Identical to current rule, except warnings would not be issued for the excluded type of comment.

  1. Should the rule be configurable, if so what parameters should be configurable?

Yes. This request is to add a configuration key such as only, which would take FIXME or TODO as its value.

todo:
  only:
    - FIXME
  1. Should the rule be opt-in or enabled by default? Why?

The rule is currently enabled by default.

@SimplyDanny SimplyDanny added enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project. labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants