Skip to content

A patch file can legally have a trailing whitespace #25

@Totktonada

Description

@Totktonada

However the checkpatch script compains about it. Example: tarantool/tarantool@157b446.

The file:

diff -ru a/test/v3ext.c b/test/v3ext.c
--- a/test/v3ext.c	2022-07-05 12:08:33.000000000 +0300
+++ b/test/v3ext.c	2022-07-14 21:07:10.586081541 +0300
@@ -8,6 +8,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/pem.h>

The script output:

$ ~/p/t/checkpatch/checkpatch.pl --color=always --git HEAD~1..HEAD
ERROR: trailing whitespace
#79: FILE: static-build/openssl-111q-gh-18720.patch:6:
+ $

total: 1 errors, 41 lines checked

Commit 157b44649937 ("static-build: bump openssl from 1.1.1n to 1.1.1q") has style problems, please review.

NOTE: If any of the errors are false positives, please file a bug at
      https://github.com/tarantool/checkpatch/issues

I can propose the following solutions:

  • Fast: ignore a trailing whitespace in *.patch files.
  • Good: allow a line that contains only whitespace symbol in *.patch files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions