Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Abandoned] Adds closure_body_length opt-in rule #1747

Closed
wants to merge 7 commits into from

Conversation

ornithocoder
Copy link
Contributor

@ornithocoder ornithocoder commented Aug 3, 2017

because closure bodies should not span too many lines. Implements #52.

@SwiftLintBot
Copy link

SwiftLintBot commented Aug 3, 2017

282 Warnings
⚠️ Big PR
⚠️ This PR introduced a violation in Aerial: /Users/distiller/SwiftLint/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:95:22: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 35 lines (closure_body_length)
⚠️ This PR introduced a violation in Alamofire: /Users/distiller/SwiftLint/osscheck/Alamofire/Source/SessionManager.swift:68:34: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 31 lines (closure_body_length)
⚠️ This PR introduced a violation in Alamofire: /Users/distiller/SwiftLint/osscheck/Alamofire/Source/SessionManager.swift:56:56: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 41 lines (closure_body_length)
⚠️ This PR introduced a violation in Alamofire: /Users/distiller/SwiftLint/osscheck/Alamofire/Source/SessionManager.swift:658:52: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 46 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Account/FxALoginStateMachine.swift:87:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Account/FxALoginStateMachine.swift:127:59: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 37 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Application/AppDelegate.swift:232:48: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 38 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Browser/BrowserTrayAnimators.swift:158:35: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Browser/ErrorPageHelper.swift:135:100: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 47 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Browser/TabPeekViewController.swift:39:55: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Home/ActivityStreamPanel.swift:512:127: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Home/HistoryPanel.swift:465:69: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 41 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Reader/ReaderModeHandlers.swift:30:93: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Frontend/Widgets/TabsButton.swift:21:43: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Client/Utils/FaviconFetcher.swift:129:43: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 43 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Providers/SyncStatusResolver.swift:72:62: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/BrowserDB.swift:145:45: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteRemoteClientsAndTabs.swift:111:35: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteRemoteClientsAndTabs.swift:162:35: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 37 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteBookmarksSyncing.swift:450:40: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 52 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteBookmarksSyncing.swift:1060:60: error: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 132 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteBookmarksSyncing.swift:1060:60: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 132 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Storage/SQL/SQLiteBookmarksSyncing.swift:1288:60: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 89 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Sync/Synchronizers/Bookmarks/BookmarksDownloader.swift:129:38: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Sync/Synchronizers/Bookmarks/ThreeWayTreeMerger.swift:415:35: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 37 lines (closure_body_length)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/SwiftLint/osscheck/Firefox/Sync/Synchronizers/Bookmarks/ThreeWayTreeMerger.swift:511:41: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 34 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Kickstarter-iOS/DataSources/ProjectActivitiesDataSourceTests.swift:18:42: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Kickstarter-iOS/ViewModels/AppDelegateViewModelTests.swift:153:42: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 39 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Kickstarter-iOS/ViewModels/AppDelegateViewModelTests.swift:386:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 39 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Kickstarter-iOS/ViewModels/AppDelegateViewModelTests.swift:578:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 36 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/RootTabBarViewController.swift:140:25: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 38 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/FormatTests.swift:406:97: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 28 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/PaginateTests.swift:382:59: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/PaginateTests.swift:424:59: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/PaginateTests.swift:475:59: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/SharedFunctionsTests.swift:56:60: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 35 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ActivitiesViewModelTests.swift:425:78: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/BackerDashboardViewModelTests.swift:66:76: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/BackerDashboardViewModelTests.swift:119:81: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 38 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/BackerDashboardProjectsViewModelTests.swift:42:100: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 35 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/BackingViewModelTests.swift:68:97: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 21 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CommentsViewModelTests.swift:149:88: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CommentsViewModelTests.swift:133:90: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 34 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CommentsViewModelTests.swift:186:95: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CommentsViewModelTests.swift:232:95: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:135:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 42 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:208:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 57 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:310:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 37 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:380:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 37 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:543:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 33 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:635:110: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 42 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:715:104: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 38 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/CheckoutViewModelTests.swift:841:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 84 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryFiltersViewModelTests.swift:285:92: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 36 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DashboardViewModelTests.swift:52:80: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 93 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DashboardViewModelTests.swift:284:51: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DashboardViewModelTests.swift:383:80: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 61 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPageViewModelTests.swift:236:90: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 47 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPageViewModelTests.swift:326:85: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 21 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPageViewModelTests.swift:366:84: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPageViewModelTests.swift:588:83: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPageViewModelTests.swift:637:83: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 21 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPostcardViewModelTests.swift:181:89: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/DiscoveryPostcardViewModelTests.swift:286:40: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 83 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/FindFriendsViewModelTests.swift:132:50: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/FindFriendsViewModelTests.swift:209:105: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 32 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/FindFriendsFriendFollowCellViewModelTests.swift:306:73: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 28 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/FindFriendsFriendFollowCellViewModelTests.swift:357:75: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 28 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/LiveStreamDiscoveryViewModelTests.swift:149:84: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/LiveStreamEventDetailsViewModelTests.swift:158:53: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 41 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/LiveStreamEventDetailsViewModelTests.swift:247:53: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/LiveStreamContainerViewModelTests.swift:1047:69: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 28 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/MessagesSearchViewModelTests.swift:79:80: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 38 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ProfileViewModelTests.swift:70:41: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ProjectActivitiesViewModelTests.swift:138:104: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 25 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ProjectNavBarViewModelTests.swift:182:87: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 25 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ProjectNavBarViewModelTests.swift:228:87: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 34 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ProjectNotificationCellViewModelTests.swift:79:86: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/SearchViewModelTests.swift:324:81: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 46 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/SearchViewModelTests.swift:440:83: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/SearchViewModelTests.swift:527:83: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/SearchViewModelTests.swift:585:83: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 34 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:111:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:147:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:344:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:380:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:417:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:453:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:489:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/ThanksViewModelTests.swift:526:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/UpdateDraftViewModelTests.swift:188:75: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/UpdateDraftViewModelTests.swift:270:105: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:432:85: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:473:85: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:516:97: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 23 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:562:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:614:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 27 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:668:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 28 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:902:40: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 30 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:1163:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 50 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2020:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 56 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2109:46: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 24 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2285:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2353:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2421:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/Library/ViewModels/RewardPledgeViewModelTests.swift:2489:94: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 40 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/LiveStream/Service/LiveStreamService.swift:55:28: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 29 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/LiveStream/Service/LiveStreamService.swift:105:28: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 22 lines (closure_body_length)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/SwiftLint/osscheck/Kickstarter/LiveStream/Service/LiveStreamService.swift:145:30: warning: Closure Body Length Violation: Closure body should span 20 lines or less excluding comments and whitespace: currently spans 26 lines (closure_body_length)
⚠️ Danger found 282 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 110.
12 Messages
📖 Linting Aerial with this PR took 0.37s vs 0.34s on master (8% slower)
📖 Linting Alamofire with this PR took 2.54s vs 2.53s on master (0% slower)
📖 Linting Firefox with this PR took 10.73s vs 10.8s on master (0% faster)
📖 Linting Kickstarter with this PR took 16.55s vs 16.64s on master (0% faster)
📖 Linting Moya with this PR took 1.24s vs 1.2s on master (3% slower)
📖 Linting Nimble with this PR took 1.45s vs 1.44s on master (0% slower)
📖 Linting Quick with this PR took 0.47s vs 0.46s on master (2% slower)
📖 Linting Realm with this PR took 2.35s vs 2.25s on master (4% slower)
📖 Linting SourceKitten with this PR took 0.89s vs 0.87s on master (2% slower)
📖 Linting Sourcery with this PR took 3.94s vs 3.8s on master (3% slower)
📖 Linting Swift with this PR took 10.55s vs 10.29s on master (2% slower)
📖 Linting WordPress with this PR took 9.74s vs 9.43s on master (3% slower)

Generated by 🚫 Danger

@codecov-io
Copy link

codecov-io commented Aug 3, 2017

Codecov Report

Merging #1747 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1747      +/-   ##
==========================================
+ Coverage   88.26%   88.34%   +0.07%     
==========================================
  Files         227      229       +2     
  Lines       11218    11291      +73     
==========================================
+ Hits         9902     9975      +73     
  Misses       1316     1316
Impacted Files Coverage Δ
...ramework/Rules/ClosureBodyLengthRuleExamples.swift 100% <100%> (ø)
Tests/SwiftLintFrameworkTests/RulesTests.swift 100% <100%> (ø) ⬆️
...iftLintFramework/Rules/ClosureBodyLengthRule.swift 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4539f2b...f4c8d76. Read the comment docs.

@ornithocoder ornithocoder force-pushed the issue_52 branch 2 times, most recently from c4dd40f to 4906ecd Compare August 4, 2017 14:09
@ornithocoder
Copy link
Contributor Author

ornithocoder commented Aug 4, 2017

I'm having problems to find the exact number of lines. The startLine and endLine seem right, but when it reports, it reports the wrong number of lines (sometimes it appears to detect valid lines as comments or blank lines).

Update 1: Issue created to discuss the problem with the valid number of code (#1750)
Update 2: The problem mentioned in #1750 also affects other rules that use the method File.exceedsLineCountExcludingCommentsAndWhitespace(_:_:_:) so I believe this PR is good to go.
Update 3: PR for number of lines #1753

@ornithocoder ornithocoder force-pushed the issue_52 branch 4 times, most recently from d1626c8 to 5b160c3 Compare August 5, 2017 08:22
@ornithocoder ornithocoder changed the title [WIP] Adds closure_body_length opt-in rule Adds closure_body_length opt-in rule Aug 5, 2017
let reason = "Closure body should span \(configuration.warning) lines or less " +
"excluding comments and whitespace: currently spans \(lineCount) " + "lines"
let closuresAsArgument = dictionary.substructure
.filter { $0.kind == SwiftExpressionKind.argument.rawValue }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use dictionary.enclosedArguments instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ornithocoder ornithocoder changed the title Adds closure_body_length opt-in rule [WIP] Adds closure_body_length opt-in rule Aug 7, 2017
@ornithocoder ornithocoder changed the title [WIP] Adds closure_body_length opt-in rule Adds closure_body_length opt-in rule Aug 7, 2017
@ornithocoder ornithocoder changed the title Adds closure_body_length opt-in rule [Blocked] Adds closure_body_length opt-in rule Aug 8, 2017
@ornithocoder
Copy link
Contributor Author

I'll keep this PR blocked for now because it depends on #1753.

Once that one is merged, this one needs to be rebased and have the tests updated to match the correct number of lines.

@ornithocoder ornithocoder changed the title [Blocked] Adds closure_body_length opt-in rule [WIP] Adds closure_body_length opt-in rule Aug 8, 2017
@ornithocoder ornithocoder force-pushed the issue_52 branch 2 times, most recently from c582bf2 to d68cb1b Compare August 10, 2017 14:30
@ornithocoder ornithocoder changed the title [WIP] Adds closure_body_length opt-in rule [Abandoned] Adds closure_body_length opt-in rule Jan 15, 2018
@ornithocoder
Copy link
Contributor Author

Depends on #1750.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants