Re: OT: Swift Code Autoformatter?
Re: OT: Swift Code Autoformatter?
- Subject: Re: OT: Swift Code Autoformatter?
- From: Charles Srstka <email@hidden>
- Date: Fri, 15 Jan 2016 02:21:16 -0600
> On Jan 14, 2016, at 2:57 PM, Quincey Morris <email@hidden> wrote:
>
> On Jan 14, 2016, at 12:36 , Charles Jenkins <email@hidden <mailto:email@hidden>> wrote:
>>
>> I keep eyeing a program that you can install to work with Xcode and autoformat source code. You know, things like automatically fixing spacing around arithmetic operators and other important types of punctuation. This is oddly important in Swift, where the compiler can’t interpret things like “let half = numerator /2”
>
> I don’t understand. (That is, I do understand, but I’m pretending for the rhetorical purposes of this post not to understand.) You type “let half = numerator /2”, which produces an inline compiler error, which you ignore, along with all the other inline compiler errors from omitting spaces when typing in the same file, then you (want to) use a utility some time later that inserts the spaces to make the errors go away? Why can’t you just type the spaces when you see the error? Sounds easier to me.
Clearly, that one error-causing issue was the one and only style issue that he would ever be fixing with the linter he was asking for recommendations on, and he wasn’t planning to do anything else with it at all other than fix instances of /2.
I certainly can’t imagine any reason why anyone would ever want to use a linter.
Charles
P.S. Even for style issues that do cause errors, if you’re converting C/ObjC code to Swift, any tool that can cut down on the huge number of things you already have to fix by hand is welcome.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden