Comments with TODO items should be excluded from the line_length check
Open
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
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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