Mailinglist Archive: yast-devel (48 mails)

< Previous Next >
[yast-devel] Overcommit - automatic checks via Git hooks


I found a quite interesting tool called Overcommit [1].

It provides an easy way for setting up Git commit hooks and provides
some basic checking plugins.

The nice feature of the Git commit hooks is that you can run some checks
automatically and early in the development. For example with the commit hooks
you can
run Rubocop check automatically whenever a commit is created. And if the check
the commit is not created.

I can see "make Rubocop happy" commits quite often (happens to me as well),
with Overcommit you can easily avoid that.

I have tried several Overcommit checks:
- Rubocop - runs Rubocop at "commit"
- Rspec - runs the tests before "push"
- Branch blacklist - can forbid direct commits to configured branches,
e.g. "master" (forces using pull requests, avoids commits to master my
- Commit message spellcheck - warns when there is a possible typo

Check my blog post [2] for the details, esp. watch the recorded screencast where
I wanted to show some mistakes which it can catch.

The tool looks promising, I'll try using it for some time. If you want to try it
as well check the blog post for the installation steps.




Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >