Add Linter to a project

I want to add a Linter to my project, such that no one can commit unless all the linting errors are cleared.

Easiest way is to use ZeroBrane Studio, it includes Lua Inspect and has similar functions of a linter.