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
It looks like the nesting rule counts cases of deeply nested enum with the statement rule while ignoring the nesting level of the enum which is in acceptable bounds. So specify type_level as something well above the statement level, build a pyramid of doom nested types with the enum as the deepest type, and you'll get a warning about the level of nesting of the cases. Example below.
This issue seemed to be related to #190, but I guess is not quite the same?
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Loading configuration from '.swiftlint.yml'
Linting Swift files at paths
Linting 'Nest.swift' (1/1)
/tmp/foo/Nest.swift:6:26: warning: Nesting Violation: Statements should be nested at most 5 levels deep (nesting)
Done linting! Found 1 violation, 0 serious in 1 file.
Environment
SwiftLint version (run swiftlint version to be sure)? 0.27.0
Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
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
New Issue Checklist
Bug Report
It looks like the nesting rule counts cases of deeply nested enum with the statement rule while ignoring the nesting level of the enum which is in acceptable bounds. So specify
type_level
as something well above the statement level, build a pyramid ofdoomnested types with the enum as the deepest type, and you'll get a warning about the level of nesting of the cases. Example below.This issue seemed to be related to #190, but I guess is not quite the same?
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.27.0xcode-select -p
)? 9.4.1The text was updated successfully, but these errors were encountered: