[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] checkpatch: avoid error on cover letter files
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] checkpatch: avoid error on cover letter files |
Date: |
Thu, 17 Sep 2020 19:44:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/17/20 7:02 PM, Stefano Garzarella wrote:
> Running checkpatch on a directory that contains a cover letter reports
> this error:
>
> Checking /tmp/tmpbnngauy3/0000-cover-letter.patch...
> ERROR: Does not appear to be a unified-diff format patch
>
> total: 1 errors, 0 warnings, 0 lines checked
>
> Let's skip cover letter as it is already done in the Linux kernel.
.. "commits 06330fc40e3f ("checkpatch: avoid NOT_UNIFIED_DIFF errors
on cover-letter.patch files") and a08ffbef4ab7 ("checkpatch: fix
ignoring cover-letter logic")."
Maybe complete with that ^^^ ?
Regardless:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index bd3faa154c..3c898f878a 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3005,7 +3005,7 @@ sub process {
> return 1;
> }
>
> - if (!$is_patch) {
> + if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
> ERROR("Does not appear to be a unified-diff format patch\n");
> }
>
>