]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
checkpatch.conf: introduce checkpatch.pl configuration
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 9 Mar 2022 11:52:35 +0000 (17:22 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 11 Mar 2022 14:46:21 +0000 (07:46 -0700)
Introduce checkpatch.conf, which defines the rules those are exempted in
libcgroup when running scripts/checkpatch.pl from Linux Kernel sources.

This helps us in introducing a coding standard and stay close to already
well defined and debated coding style that of the Linux Kernel.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
.checkpatch.conf [new file with mode: 0644]

diff --git a/.checkpatch.conf b/.checkpatch.conf
new file mode 100644 (file)
index 0000000..43ac028
--- /dev/null
@@ -0,0 +1,15 @@
+# There is no Kernel tree available, run without it.
+--no-tree
+
+# Ignore the SPDX License tag, that's supposed to be the first line in
+# Linux Kernel sources.
+--ignore SPDX_LICENSE_TAG
+
+# We do not follow the negative error numbering, so ignore it.
+--ignore USE_NEGATIVE_ERRNO
+
+# Follow the 80-character limit.
+--max-line-length=80
+
+# Kernel specific kstr* functions recommendation doesn't apply to us.
+--ignore SSCANF_TO_KSTRTO