When I found this pre-commit script, I immediately thought, that it was too inconvenient to use.
So I decided to reimplement it using pre-commit.com.
Hopefully it will be useful for the community. And I will probably add more pre-commit hooks, like ansible-lint.