Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1707

Track "TODO" and "FIXME" comments that do not contain a reference to a person

    Details

    • Type: Finding Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Add a citation of the person who can best explain this comment.
    • List of parameters:
      Hide

      Key: pattern
      Description: A regular expression defining the pattern that should be present after "TODO" or "FIXME"
      Default: [ ]*([ _a-zA-Z0-9@.]+)

      Show
      Key: pattern Description: A regular expression defining the pattern that should be present after "TODO" or "FIXME" Default: [ ]*([ _a-zA-Z0-9@.]+)
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Targeted languages:
      C#, HTML, Java, JavaScript, PHP, Swift, VB.Net, VB6, XML
    • Covered Languages:
      C, C++, Objective-C, Python
    • SwiftLint:
      todo

      Description

      TODO and FIXME comments are typically intended to be short-lived; they are placeholders and reminders that programmers leave for themselves. Unfortunately, even with the best of intentions, those comments are not always acted on and removed in a timely manner. Thus, they can become mysterious, lingering cruft in a code base, reducing both readability and understand-ability.

      This rule flags all FIXME and TODO comments that do not have an attribution matching the specified regular expression immediately after the FIXME or TODO. Ideally, such comments will also contain information about what needs to be fixed or done, but this rule does not enforce that.

      Noncompliant Code Example

      Using the default regular expression: [ ]*([ _a-zA-Z0-9@.]+):

      // TODO 
      

      Compliant Solution

      // TODO(ganncamp) per the business partners, more checks needed
      

        Attachments

          Issue Links

          1.
          Python RSPEC-2706 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.campbell.2 Ann Campbell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: