To be able to validate and automatically fix commits we're using git hooks. We're also heavily relying on pre-commit, which is a framework for managing and maintaining multi-language pre-commit hooks.