realm / realm/SwiftLint

Comments with TODO items should be excluded from the line_length check

Open
#4,545 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

New Issue Checklist
Describe the bug

Should not the line_length rule exclude TODO comments (i.e. "// TODO: I should post an issue on SwiftLint for the rule ... ") as TODOs tend to be long every now and then?

Complete output when running SwiftLint, including the stack trace and command used

N/A

Environment
  • 0.49.1

  • Homebrew

  • Paste your configuration file: N/A - using default

  • Are you using nested configurations? No

  • Which Xcode version are you using (check xcodebuild -version)? Version 14.1 (14B47b)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the line_length rule and inspecting how it measures comments. Reproduce the reported case with a long // TODO: comment, then add coverage and verify TODO comments are excluded without changing other line-length diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.