On Tuesday, January 13, 2015 at 8:35:05 PM UTC+1, Marko Paloski wrote:
> I want to make i script that check the code style in the commit, so if
> don't matches, it will not allow the developers to commit the code.
> The script will be in pre-commit local or in pre-recieve on the server. I
> find something about uncrustify :
> But i don't know how to implement. Yes it can be bash or powershell script.
You may want to have a look server side hooks here:
I would be wary of doing these kinds of checks in a hook the way you plan.
I like more the approach where code is suggested using pull- or change
requests in pushed branches - and then automatic build agents run
stylecheckers against those branches, before they are allowed to be merged
to the main branch.
Alternatively, I would try motivating developers to run style-checkers
locally before pushing (many IDEs can do this continuously). Putting
obstacles in way of developers is not a good motivator. It's better to
improve tools and culture to make their job easier.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.