-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Closure end indentation rule #1004
Conversation
I'm not sure I stylistically agree with the current semantics (the style changes you've already made). Would need to write down more explicit rules just in sentences/point-form explaining when to place closing braces and where. |
So, my interpretation of the comments in #326 was:
|
Yeah, that sounds good. It was hurting my head a bit to try to think of when you'd apply which rules... this is why we need machines to decide this for us! 😅 |
🤖 > 👨💻 |
Is it too late to rename SwiftLint to this? 😂 But seriously, this is the exact opposite of the point I was trying to make in my SwiftLint presentation from last week (slides), that you shouldn't bend to the will of the machines and humans know better... But there are times when the machines pay closer attention to details than we can. |
Maybe the issue is that it's harder to come up with logic rules to describe what "feels right". Our intuition is much more complex than I thought! I've learned the hard way when developing #847. |
This. Though it is definable. |
Current coverage is 82.28% (diff: 96.87%)@@ master #1004 diff @@
==========================================
Files 137 138 +1
Lines 6530 6587 +57
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5365 5420 +55
- Misses 1165 1167 +2
Partials 0 0
|
🎉 thanks Marcelo! |
Fixes #326
This still have some issues:
The main issue here is that I'd need the starting point of the method related to the closure, not the full chained one (which is what SourceKits gives me). Any ideas on how to get it?