Skip to content

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

Description

@grantneufeld

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.good first issueIssue to be taken up by new contributors yet unfamiliar with the project.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions