Hi! I’m Sami and I work at Atlassian — an Australian software company trying to unleash the potential in all teams.Read More
Obviously the point of the comic is that the decision is fairly arbitrary, but consistency is of the utmost important.
So the question is: Teams how do you stay consistent? or How do you stay consistent to your former self? The answer: Style Checking.
So I thought I'd write this blog post to talk about the way I use style checking. Obviously I spend a lot of time doing iOS, so let's talk about that.
Firstly, I have a few requirements for such as tool.
- Support both Swift and Objective-C
- Produce inline style errors in Xcode
- Easy to configure
- A nice settings file that could be checked into Git
- Free or low cost
The workflow is really simple too. To start, simply gather your team and take the survey together. Once the yelling ceases and the evil eyes have stopped being made, you'll have yourself a downloadable settings file.
Once you've got that, grab a copy of the software (It's very cheap at $10USD).
Then, open the app, drag your xcodeproject or xcworkspace into it, and it'll configure itself. Under the hood, it adds a build step that'll style check your code after each build.
From there, the style errors will jump out at you, and you can take a small amount of time to bring your project up to consistency. Boom.
So that's how I take care of Style Checking. Props to Blair for showing me the ways back in the day. It's been rewarding to keep our code looking 💯.
Do you use style checking? If so, what do you use? Do you know any other tools? I'd love to hear from you on twitter - I'm @samjarman.