[ofiwg] linux coding style question, or what is the libfabric interpretation of "resembles"

Dave Goodell (dgoodell) dgoodell at cisco.com
Tue Mar 10 13:51:50 PDT 2015


Howard,

Not to rain on the parade, but how do you intend to implement this?

If you really mean "pre-commit hooks" in the Git sense (local hook scripts that run during "git commit" and don't let it succeed if the script fails), then I don't think there's a way to have one of those installed automatically for someone just by cloning the repository.  We could stick it in a "contrib" directory and ask developers to copy/link the script into their ".git/" directories whenever they clone a new repository, but that's far from a robust solution.  You could use a "template" (see http://git-scm.com/docs/git-init) to make it a little easier, but there will still be a manual step.

If you meant "pre-receive hooks" instead (server-side scripts that run during "git push" before a ref is updated) I don't think that GitHub permits pre-commit hooks, just notification web hooks that run after something gets pushed to a branch.  Those web hooks are more equivalent to a Git "post-receive" hook, but they are only useful for after-the-fact checking.

We could run after-the-fact checking on PRs and general pushes.  That would be similar to the Open MPI Jenkins integration that is currently set up.  Letting a computer point out obvious mistakes is great, but I don't think we should contort the development process for something like whitespace checking.

-Dave

On Mar 10, 2015, at 3:27 PM, Jeff Squyres (jsquyres) <jsquyres at cisco.com> wrote:

> +1 for a libfabric-wide git pre-commit hook.
> 
> I use a pre-commit hook to look for excess whitespace and ensure that the Cisco copyright is up-to-date at the top of the file(s) that I commit; it's fantastic.  Rote automation like this are exactly what computers are for.
> 
> 
>> On Mar 10, 2015, at 4:09 PM, Howard Pritchard <hppritcha at gmail.com> wrote:
>> 
>> HI Folks,
>> 
>> A question has come up about how closely the libfabric code should adhere
>> to the linux coding style.  
>> 
>> We've run a perl script that checks for adherence to the linux coding style
>> against libfabric and it complains a lot.
>> 
>> The question is, how closely do we want to adhere to the linux coding style?
>> 
>> Should we consider adding a pre-commit hook that does style checking?
>> I could see this might also reduce time with PR review nit picking if the
>> reviewer(s) knew the that commits had to pass such a code style checking hook.
>> 
>> Howard
>> 
>> 
>> 
>> _______________________________________________
>> ofiwg mailing list
>> ofiwg at lists.openfabrics.org
>> http://lists.openfabrics.org/mailman/listinfo/ofiwg
> 
> 
> -- 
> Jeff Squyres
> jsquyres at cisco.com
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> _______________________________________________
> ofiwg mailing list
> ofiwg at lists.openfabrics.org
> http://lists.openfabrics.org/mailman/listinfo/ofiwg




More information about the ofiwg mailing list