From: Joe Perches <joe@perches.com>
To: Alison Schofield <amsfield22@gmail.com>,
outreachy-kernel@googlegroups.com
Subject: Re: checkpatch post-commit hook
Date: Fri, 03 Mar 2017 17:15:46 -0800 [thread overview]
Message-ID: <1488590146.2179.39.camel@perches.com> (raw)
In-Reply-To: <20170304001259.GA4417@d830.WORKGROUP>
On Fri, 2017-03-03 at 16:13 -0800, Alison Schofield wrote:
> I'm thinking of adding a git post-commit hook to our First Patch Tutorial.
>
> Recently, Joe Perches (checkpatch author) showed us a spelling error
> in a log message found by checkpatch and it made me realize we may be
> under-utilizing checkpatch in the workflow as defined in the first patch
> tutorial.
>
> If you use it pre-commit (and while working a file) it shows you
> issues in your files. But, if you use it on the built patch, you
> can also see WARNINGS like:
>
> WARNING: Do not use whitespace before Signed-off-by:
> WARNING: please write a paragraph that describes the config symbol fully
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
>
> Here's a post commit hook:
>
> .git/hooks$ cat post-commit
> #!/bin/sh
> exec git show HEAD | scripts/checkpatch.pl --nosummary
exec git show --format=email HEAD | ./scripts/checkpatch.pl --strict
> If someone will verify this and agree we should add it - I'll add it to
> the first patch tutorial.
>
> And, of course, you'll let me know if there's another/better way
> to do it!
>
> alisons
next prev parent reply other threads:[~2017-03-04 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-04 0:13 checkpatch post-commit hook Alison Schofield
2017-03-04 1:15 ` Joe Perches [this message]
2017-03-04 22:21 ` Alison Schofield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488590146.2179.39.camel@perches.com \
--to=joe@perches.com \
--cc=amsfield22@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.