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

Von Behren, Paul paul.von.behren at intel.com
Tue Mar 10 14:04:45 PDT 2015


I suggesting looking at travis-ci: https://github.com/travis-ci/travis-ci

A project my team has on github uses travis to run  on every commit, pull our code, run a style check, build, then run unit tests - we do this with both gcc and clang.  If anything fails, the commit (on the web site) gets a  red (rather than green) icon and send email.  You can see the logs via github  to figure out what went wrong.  It's a great complement to github.  Took very little effort to set up.


> -----Original Message-----
> From: ofiwg-bounces at lists.openfabrics.org [mailto:ofiwg-
> bounces at lists.openfabrics.org] On Behalf Of Jeff Squyres (jsquyres)
> Sent: Tuesday, March 10, 2015 2:55 PM
> To: Dave Goodell (dgoodell)
> Cc: OFIWG Mailing list
> Subject: Re: [ofiwg] linux coding style question, or what is the libfabric
> interpretation of "resembles"
> 
> FWIW, I was assuming it would be both:
> 
> 1. A contrib pre-commit hook that you can install in your git repo.
> 2. A post-commit hook (perhaps notified via Github web hook) that checks
> each commit and yells when you get it wrong.
> 
> 
> 
> > On Mar 10, 2015, at 4:51 PM, Dave Goodell (dgoodell)
> <dgoodell at cisco.com> wrote:
> >
> > 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
> >
> 
> 
> --
> 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