Re: [RFC] checkpatch: add option to change warning return value.

From: Johannes Weiner
Date: Wed Mar 23 2011 - 06:07:49 EST

On Tue, Mar 22, 2011 at 04:13:10PM -0700, Sarah Sharp wrote:
> There are a lot of warnings in that are rather subjective.
> For instance, when a line is 81 characters long, and the patch submitter
> is just cleaning up existing code, a maintainer may not care that
> warns about the over 80-character line. It should be up to
> the maintainer what warnings they want to pay attention to.
> Unfortunately, if you try to run as part of a git pre-commit
> hook and a patch in a series being applied by git-am fails,
> the whole process stops. At that point I usually end up just disabling
> that git hook, which means I don't see real errors in the patches.
> Add an option to to print the warnings, but not return an
> error code when the --lazy flag is present. (Anyone with a better name
> can pipe up, lazy just seemed to be the opposite to strict.) This allows
> the maintainer to view the warnings, but still allow the patch application
> process to continue.

I first thought you would add code that allowed turning only select
errors into warnings.

If you just want to have git continue in any case, why not append
'|| true' to the line that invokes checkpatch in your hook script?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at