You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expiring_todo rule does not trigger when there are // TODO: comments above it in the file
Complete output when running SwiftLint, including the stack trace and command used
With a todo comment on a line above the todo with date, no expiring_todo violation
$ echo"// TODO: XYZ \n public enum Redacted { // TODO: [10/14/2019]"| Pods/SwiftLint/swiftlint line --no-cache --use-stdin --enable-all-rules
<nopath>:2:1: warning: Indentation Width Violation: Code should be indented using one tab or 4 spaces. (indentation_width)
<nopath>:2:9: warning: Missing Docs Violation: public declarations should be documented. (missing_docs)
<nopath>:1:4: warning: Todo Violation: TODOs should be resolved (XYZ). (todo)
<nopath>:2:28: warning: Todo Violation: TODOs should be resolved ([10/14/2019]). (todo)
With a normal comment on a line above the todo with date, correctly returns expiring_todo violation
$ echo"// XYZ \n public enum Redacted { // TODO: [10/14/2019]"| Pods/SwiftLint/swiftlint line --no-cache --use-stdin --enable-all-rules
<nopath>:2:35: error: ExpiringTodo Violation: TODO/FIXME has expired and must be resolved. (expiring_todo)
<nopath>:2:1: warning: Indentation Width Violation: Code should be indented using one tab or 4 spaces. (indentation_width)
<nopath>:2:9: warning: Missing Docs Violation: public declarations should be documented. (missing_docs)
<nopath>:2:28: warning: Todo Violation: TODOs should be resolved ([10/14/2019]). (todo)
Environment
SwiftLint version (run swiftlint version to be sure)? 0.45.0
Installation method used (Homebrew, CocoaPods, building from source, etc)? CocoaPods
The text was updated successfully, but these errors were encountered:
Finally, I understand why some of my // TODO: [mm/dd/yyyy] Xxx are not triggered while others work perfectly! Exactly as described above, all you need is just have at least two such todos (separated by non-comment) in a swift file.
New Issue Checklist
Describe the bug
The expiring_todo rule does not trigger when there are
// TODO:
comments above it in the fileComplete output when running SwiftLint, including the stack trace and command used
With a todo comment on a line above the todo with date, no expiring_todo violation
With a normal comment on a line above the todo with date, correctly returns expiring_todo violation
Environment
swiftlint version
to be sure)? 0.45.0The text was updated successfully, but these errors were encountered: