git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC14][RFC] Is there any interest in adding a port of checkpatch.pl to contrib/?

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 18, 2014, 04:40 UTC
Message-ID
<CAPig+cQPZrHf_Bm_s_qmP6nX2dKcFNi+EUKoPObXHn1novuaHw@mail.gmail.com>
In-Reply-To
<CAL0uuq0RWpWPa2TOk09xE9SjG0-Z=EAMG2iQ9Y0z_XMYvRsJ3g@mail.gmail.com>

On Mon, Mar 17, 2014 at 9:38 PM, Jacopo Notarstefano <jacopo.notarstefano@gmail.com> wrote:

Show 6 quoted lines
> It seems to me that the topic of adding the checkpatch.pl script to
> Git's source tree has cropped up several times in the past, as
> recently as a couple of days ago: $gmane/243607.
>
> It should be noted that its usage for its sake has been discouraged by
> Junio Hamano in $gmane/205998.

In the referenced message, Junio says that he often runs checkpatch.pl on incoming patches.

Show 12 quoted lines
> Also, its use is somewhat controversial
> and has led to flames and even a public fork.
>
> Despite this, I think that git might benefit from a port of
> checkpatch.pl. In fact, even Junio had admitted to use part of its
> features later in $gmane/205998.
>
> We could simply use linux's script/checkpatch.pl, but I think a port
> is needed for these reasons:
>
> 1. Git style guidelines are somewhat different and less strict than
> their Linux equivalents.

Are checkpatch.pl's customization options, such as --ignore, insufficient to make it behave in the desired fashion for git?

Show 6 quoted lines
> 2. Several patch threads bounce back and forth because of style fixes.
> A checkpatch script added as a hook could help reduce these and use
> more efficiently our time.
> 3. As far as I can tell, checkpatch needs to be run from the root
> folder of a linux repository clone. Cloning several hundred MBs for a
> single perl script looks a little foolish to me.

No need to clone the kernel. checkpatch.pl runs fine standalone with the --no-tree option.

Show 8 quoted lines
> So, is there any interest in adding a port of checkpatch.pl to
> contrib/? I might work on this as part of GSoC. I still haven't
> submitted my application about git bisect (life got in the way!), but
> Michael Heggarty remarked in $gmane/242703 that my original idea had
> too little meat in it to constitute a good GSoC proposal.
>
> Cheers,
> Jacopo Notarstefano
Previous: Jacopo NotarstefanoNext: Junio C Hamano
Message 2 of 6 in “[GSoC14][RFC] Is there any interest in adding a port of checkpatch.pl to contrib/?”
  1. Jacopo NotarstefanoMar 18, 2014
  2. Eric SunshineMar 18, 2014
  3. Junio C HamanoMar 18, 2014
  4. Junio C HamanoMar 18, 2014
  5. Jacopo NotarstefanoMar 18, 2014
  6. demerphqMar 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.