Open abbeyjackson opened 7 years ago
Not sure... It's hard to test all the possible combinations of code 😅 I'll commit what I've got so far soon.
@Pahitos if you need someone to try it out, I'd be happy to run some of my code through it. That should pretty much break anything ;)
@Pahitos @GrfxGuru Also I sent Pavel a message on slack about the rules and what can be changed :)
@Pahitos if this is
@Pahitos Is this complete and should be closed, or should it be in the in progress column?
So it's done or not? We about swiftlint for Atom?
I was somehow missing these notifications, sorry about that.
The only part that I couldn't do is the 3rd and 4th point of project specific Empty Lines and Line Breaks rule:
// Some code
if foo != nil {
// several lines of code
}
// More code
where you have to have a line break before and after the if statement and on the first line, if there are 'several lines of code'.
To me personally, this seems kind of vague and IMO something like this should be up to the programmer to decide. But if someone can figure out how to make a rule for this, that'd be awesome. There's another similar rule for closures (3rd example), which is even harder to implement (maybe even impossible without SourceKitten).
@Pahitos could you send you lint source file?
@dimpiax It's been committed to the template already: https://github.com/CodeDoesGood/iOS-Template/blob/master/iOS-Template/CodeDoesGood-iOSTemplate/.swiftlint.yml
@Pahitos so this is not real-time checker? just a model.
Could you implement realtime in Atom?
@dimpiax not sure what you mean by implementing it in Atom 🤔 It shows the warnings in Xcode when you build the project. I was following these instructions
@dimpiax hmmm... Just installed this plugin and it works 🤔 What does this have to do with iOS-Template though?
@Pahitos Just to be sure that is works.
Yup. As long as the plugin is installed, it should be all good 👍
Pavel we talked several times about the line breaks on Slack and I told you it wasn't important :) but that if the Swiftlint default is different than you need to edit the style guide to match Swiftlint. --
Sincerely,
Abbey Jackson
604-600-1450 <javascript:void(0);> https://github.com/abbeyjackson http://ca.linkedin.com/in/earthabbey
Dima Swiftlint is an add-in for Xcode that ensures every project adheres to certain code formatting guidelines and best practices. --
Sincerely,
Abbey Jackson
604-600-1450 <javascript:void(0);> https://github.com/abbeyjackson http://ca.linkedin.com/in/earthabbey
@abbeyjackson I am about best practice to lint in realtime.
Swiftlint will give warnings and errors in Xcode at compile time. This is a standard tool used in iOS development. --
Sincerely,
Abbey Jackson
604-600-1450 <javascript:void(0);> https://github.com/abbeyjackson http://ca.linkedin.com/in/earthabbey
@Pahitos how's this going?