Code quality enforcement tools

Rodrigo Lopez
August 28, 2017

This is a series of posts describing some of the tools we use to keep our code clean and enforce best practices and project-specific standards.

Imagine you’ve started working on this ambitious project, a team of six developers, 40 hours a week, and a backlog full of features waiting to be coded. Your team starts their tasks, and quickly get stuff working, after one day of work you've got your data models defined, seamless interfacing, unit tests passing, everything works as expected, life is good.

You get to work the next morning, grab a coffee and pull the recent changes. You run the unit tests and something looks different, floating point numbers showing up between tests, looks like someone forgot a print() statement somewhere in the code...

Ok, no reason to panic, it happens.

Then some unit tests start failing because someone changed an interface and now there is an "Unexpected argument" in a function call. This is getting frustrating, ok, let's find out what the author's intention was by git-blaming that line. Commit message says "Api updates."... No actual information, no ticket number, nothing.

You start investigating about commit validations, and find this wonderful thing called git hooks.

This is more or less what happened in a particular project at Sophilabs, and this series of posts aims to help developers in search of convention enforcement techniques.

"Code quality enforcement tools" by Rodrigo Lopez is licensed under CC BY SA. Source code examples are licensed under MIT.

Photo by sophilabs.

Categorized under open source.

We’d love to work with you.

We treat client projects as if they were our own, understanding the underlying needs and astonishing users with the results.