One of the biggest hurdles that I’ve experienced when working with pull requests in some of the projects I have on GitHub is the use of tabs and spaces and how they impact how code appears on the landing page.
Naturally, code should be well-formatted and easy to read not only for those who are simply investigating the project but also who are contributing to it.
Though I’ve shared a few plugins specifically for Coda on how to automate this, but we all use different editors, have different formatting techniques, and so on. The thing is, there’s not much we can do about how others configure their editor.
But here’s the thing: I think that if you’re the one in charge of a project, you have the responsibility of making sure that all merged code is easy to read and easy to manage.
Just as we have linters for various languages, we also have code formatters for different languages. Last week, I discovered PHP Formatter which is a really solid web application that serves as a solid, ahem, PHP code formatter.