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

Include named closure parameters in closure end indentation rule #2132

Merged
merged 6 commits into from
May 6, 2018

Conversation

erichoracek
Copy link
Contributor

Fixes #2121

Let me know if you think this belongs as a config parameter to this rule. Thanks in advance for taking a look!

@erichoracek erichoracek force-pushed the eh-close-end-indentation-params branch from 86b1b29 to 6450c92 Compare April 2, 2018 06:17
@SwiftLintBot
Copy link

SwiftLintBot commented Apr 2, 2018

271 Warnings
⚠️ This PR may need tests.
⚠️ This PR introduced a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/ClipboardBarDisplayHandler.swift:155:13: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 20, got 12. (closure_end_indentation)
⚠️ This PR introduced a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Settings/AdvanceAccountSettingViewController.swift:132:13: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 16, got 12. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/BackerDashboardViewController.swift:310:9: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 10, got 8. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/BackerDashboardViewController.swift:320:9: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 10, got 8. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/DiscoveryNavigationHeaderViewController.swift:251:10: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 8, got 9. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/ThanksViewController.swift:216:9: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 10, got 8. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Controllers/ThanksViewController.swift:228:7: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 8, got 6. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Transitions/CrossDissolveTransitionAnimator.swift:26:5: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 4. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/Kickstarter-iOS/Views/Transitions/CrossDissolveTransitionAnimator.swift:30:5: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 4. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:9:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:16:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:23:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:30:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:37:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:44:32: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 31. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Activity.MemberDataLenses.swift:51:23: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 22. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:8:91: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 90. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:14:91: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 90. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:20:91: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 90. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:26:91: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 90. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:32:80: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 79. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:38:83: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 82. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:44:84: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 83. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ActivityLenses.swift:50:86: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 85. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/CommentLenses.swift:13:20: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 19. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/CommentLenses.swift:29:17: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 16. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:11:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:20:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:29:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:37:85: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 84. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:45:86: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 85. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:53:86: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 85. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:61:86: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 85. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:69:109: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 108. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:77:109: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 108. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:86:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:95:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:104:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:113:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/BackingLenses.swift:122:21: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 20. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:10:68: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 67. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:18:56: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 55. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:26:68: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 67. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:34:68: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 67. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:41:75: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 74. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:48:109: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 108. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ConfigLenses.swift:55:95: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 94. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ItemLenses.swift:8:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ItemLenses.swift:14:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ItemLenses.swift:20:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/ItemLenses.swift:26:24: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 23. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:14:87: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 86. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:24:87: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 86. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:34:87: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 86. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:44:87: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 86. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:55:87: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 86. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/GraphCategoryLenses.swift:65:69: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 68. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/LocationLenses.swift:8:71: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 70. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/LocationLenses.swift:14:38: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 37. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/LocationLenses.swift:20:71: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 70. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/LocationLenses.swift:26:57: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 56. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/LocationLenses.swift:32:66: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 65. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageLenses.swift:8:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageLenses.swift:14:28: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 27. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageLenses.swift:20:41: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 40. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageLenses.swift:26:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:11:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:19:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:27:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:35:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:43:47: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 46. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:51:47: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 46. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:59:47: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 46. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:67:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:75:89: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 88. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:83:89: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 88. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:91:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:99:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:107:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:115:74: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 73. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:123:84: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 83. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:131:78: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 77. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:139:81: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 80. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/DiscoveryParamsLenses.swift:147:68: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 67. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageThreadLenses.swift:8:104: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 103. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageThreadLenses.swift:14:92: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 91. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageThreadLenses.swift:20:96: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 95. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageThreadLenses.swift:27:65: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 64. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/MessageThreadLenses.swift:33:95: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 94. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.MemberDataLenses.swift:8:99: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 98. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.MemberDataLenses.swift:14:99: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 98. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.MemberDataLenses.swift:20:79: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 78. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.MemberDataLenses.swift:26:79: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 78. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.PersonalizationLenses.swift:8:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.PersonalizationLenses.swift:14:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.PersonalizationLenses.swift:20:34: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 33. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.PersonalizationLenses.swift:26:24: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 23. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.DatesLenses.swift:8:44: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 43. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.DatesLenses.swift:14:45: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 44. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.DatesLenses.swift:20:44: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 43. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.DatesLenses.swift:26:29: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 28. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:9:84: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 83. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:16:84: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 83. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:23:84: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 83. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:30:105: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 104. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:37:105: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 104. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:45:51: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 50. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:52:106: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 105. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:59:107: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 106. (closure_end_indentation)
⚠️ This PR introduced a violation in Kickstarter: /Users/distiller/project/osscheck/Kickstarter/KsApi/models/lenses/Project.StatsLenses.swift:67:51: warning: Closure End Indentation Violation: Closure end should have the same indentation as the line that started it. Expected 6, got 50. (closure_end_indentation)
⚠️ Danger found 271 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 111.
12 Messages
📖 Linting Aerial with this PR took 0.4s vs 0.36s on master (11% slower)
📖 Linting Alamofire with this PR took 3.62s vs 3.01s on master (20% slower)
📖 Linting Firefox with this PR took 13.32s vs 11.04s on master (20% slower)
📖 Linting Kickstarter with this PR took 19.34s vs 15.79s on master (22% slower)
📖 Linting Moya with this PR took 2.07s vs 1.76s on master (17% slower)
📖 Linting Nimble with this PR took 1.79s vs 1.45s on master (23% slower)
📖 Linting Quick with this PR took 0.53s vs 0.48s on master (10% slower)
📖 Linting Realm with this PR took 3.88s vs 2.99s on master (29% slower)
📖 Linting SourceKitten with this PR took 1.05s vs 0.94s on master (11% slower)
📖 Linting Sourcery with this PR took 4.91s vs 4.26s on master (15% slower)
📖 Linting Swift with this PR took 26.12s vs 25.63s on master (1% slower)
📖 Linting WordPress with this PR took 13.67s vs 13.67s on master (0% slower)

Generated by 🚫 Danger

@codecov-io
Copy link

codecov-io commented Apr 2, 2018

Codecov Report

Merging #2132 into master will increase coverage by 0.02%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2132      +/-   ##
==========================================
+ Coverage   91.86%   91.88%   +0.02%     
==========================================
  Files         270      270              
  Lines       13220    13303      +83     
==========================================
+ Hits        12144    12223      +79     
- Misses       1076     1080       +4
Impacted Files Coverage Δ
...intFramework/Rules/ClosureEndIndentationRule.swift 96.98% <95.23%> (-1.81%) ⬇️

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 f8318db...a5946ee. Read the comment docs.

@marcelofabri
Copy link
Collaborator

marcelofabri commented Apr 24, 2018

IIRC this was a tradeoff that I made when writing the rule to avoid triggering too many warnings in cases like this where it's not really super clear what the "best" style is.

Or even in cases like this where fixing the violation would be actually worse than the way it's right now.

Maybe we should only make this check if the first parameter is in a new line?

@erichoracek erichoracek force-pushed the eh-close-end-indentation-params branch from 6450c92 to 8089815 Compare April 30, 2018 04:56
@erichoracek
Copy link
Contributor Author

erichoracek commented Apr 30, 2018

@marcelofabri good call—I've updated this rule to only lint closure argument indentation if the first parameter is on a newline. PTAL!

@erichoracek erichoracek force-pushed the eh-close-end-indentation-params branch from 8089815 to a5946ee Compare May 5, 2018 21:54
@jpsim
Copy link
Collaborator

jpsim commented May 6, 2018

Looks great overall! I did find one false positive though:

self.asdf(asdf: .asdf, asdfasdfasdf: {
    asdfasdfasdfasdf })
{ result in
    guard case .success = result else {
        return
    }

    self.asdfasdfasdf(asdfasdfasdfasdf: true) {
        asdfasdfASDFasdfasdf
    }
}

code obviously obfuscated.

CHANGELOG.md Outdated
@@ -19,6 +19,11 @@
[Marcelo Fabri](https://github.com/marcelofabri)
[#2127](https://github.com/realm/SwiftLint/issues/2127)

* Fixes a case where the `closure_end_indentation` rule wouldn't lint the end
indentation of non-trailing closure parameters.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@erichoracek erichoracek force-pushed the eh-close-end-indentation-params branch from a5946ee to 26c36d4 Compare May 6, 2018 22:09
@erichoracek
Copy link
Contributor Author

@jpsim Thanks for the review! I tried pasting your false positive into the non-triggering examples section but I wasn't able to get it to trigger a test failure. I've pushed it up on a branch here—let me know if I'm missing something:

erichoracek@1bdf816

Thanks in advance for taking a look!

@jpsim
Copy link
Collaborator

jpsim commented May 6, 2018

Sorry @erichoracek I made a mistake, there's no false positive. It was a false-false-positive 😅

I'm reviewing the rest now.

Copy link
Collaborator

@jpsim jpsim left a comment

Choose a reason for hiding this comment

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

👍 excellent work!

@jpsim jpsim merged commit 9a340a2 into realm:master May 6, 2018
@erichoracek erichoracek deleted the eh-close-end-indentation-params branch May 9, 2018 17:54
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.

5 participants