From 4ff360e62129f562568a08beda692f463f36bb63 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 14 Oct 2022 11:08:42 +0000 Subject: [PATCH] Provide `CheckPatch` configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provie a CheckPatch configuration file and mention it in the coding style guidelines (this feature was introduced with CheckPatch version 0.32 ~11 years ago). Signed-off-by: Marc Hartmayer Reviewed-by: Steffen Eiden Reviewed-by: Jan Höppner Signed-off-by: Jan Höppner --- .checkpatch.conf | 12 ++++++++++++ CODINGSTYLE.md | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .checkpatch.conf diff --git a/.checkpatch.conf b/.checkpatch.conf new file mode 100644 index 00000000..6d7ef1c0 --- /dev/null +++ b/.checkpatch.conf @@ -0,0 +1,12 @@ +--max-line-length=100 +--strict + +# Not Linux therefore don't expect a Linux tree +--no-tree + +# Ignore the following +--ignore PREFER_KERNEL_TYPES +--ignore EXECUTE_PERMISSIONS +--ignore FILE_PATH_CHANGES +--ignore NEW_TYPEDEFS +--ignore SPDX_LICENSE_TAG diff --git a/CODINGSTYLE.md b/CODINGSTYLE.md index 1c6507d8..86c2342c 100644 --- a/CODINGSTYLE.md +++ b/CODINGSTYLE.md @@ -4,8 +4,10 @@ Coding guidelines for s390-tools For s390-tools the preferred language is C. We provide libraries, e.g. [`libutil`](libutil) that should be used by all tools if possible. -The coding style is based on the Linux [kernel guidelines]. Therefore, use -the [checkpatch] tool for verification before you submit a patch. +The coding style is based on the Linux [kernel guidelines]. Therefore, use the +[checkpatch] tool for verification before you submit a patch. s390-tools +provides a CheckPatch configuration for this - see +[`.checkpatch.conf`](.checkpatch.conf). [kernel guidelines]: https://www.kernel.org/doc/html/latest/process/coding-style.html [checkpatch]: https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl