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
How many lines are in foo function? swiftlint thinks there are 5 lines, but there's 3 lines of code.
This rule ignores comments and whitespaces already since they are not an actual lines of code (#369). So, why a conditional directives does count?
I believe it's an incorrect rule behaviour.
Environment
SwiftLint version (run swiftlint version to be sure)?
0.39.1
Installation method used (Homebrew, CocoaPods, building from source, etc)?
CocoaPods
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
stalebot
added
the
wontfix
Issues that became stale and were auto-closed by a bot.
label
Nov 8, 2020
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
jpsim
added
enhancement
Ideas for improvements of existing features and rules.
and removed
wontfix
Issues that became stale and were auto-closed by a bot.
labels
Feb 23, 2021
New Issue Checklist
Describe the bug
type_body_length rule counts lines with conditional directives as lines of code, which is not correct. Example:
How many lines are in foo function? swiftlint thinks there are 5 lines, but there's 3 lines of code.
This rule ignores comments and whitespaces already since they are not an actual lines of code (#369). So, why a conditional directives does count?
I believe it's an incorrect rule behaviour.
Environment
swiftlint version
to be sure)?0.39.1
CocoaPods
swiftlint ouptut for sample above:
using sample yml:
The text was updated successfully, but these errors were encountered: