Change in osmo-ci[master]: lint/checkpatch: add Osmocom specific wrapper

osmith gerrit-no-reply at lists.osmocom.org
Wed Jun 16 15:43:03 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/24701 )


Change subject: lint/checkpatch: add Osmocom specific wrapper
......................................................................

lint/checkpatch: add Osmocom specific wrapper

Related: OS#5087
Change-Id: I0ec6a3bc57a4d31c821fa83370f05c6d4ac2a5b0
---
A lint/checkpatch/checkpatch_osmo.sh
1 file changed, 46 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/01/24701/1

diff --git a/lint/checkpatch/checkpatch_osmo.sh b/lint/checkpatch/checkpatch_osmo.sh
new file mode 100755
index 0000000..0a5c65f
--- /dev/null
+++ b/lint/checkpatch/checkpatch_osmo.sh
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+SCRIPT_DIR="$(dirname "$(realpath "$0")")"
+
+# Excluded paths:
+# * lint/checkpath: so it does not warn about spelling errors in spelling.txt :)
+
+# Ignored checks:
+# * ASSIGN_IN_IF: not followed (e.g. 'if ((u8 = gsup_msg->cause))')
+# * AVOID_EXTERNS: we do use externs
+# * BLOCK_COMMENT_STYLE: we don't use a trailing */ on a separate line
+# * CONSTANT_COMPARISON: not followed: "Comparisons should place the constant on the right side"
+# * EMBEDDED_FUNCTION_NAME: often __func__ isn't used, arguably not much benefit in changing this when touching code
+# * EXECUTE_PERMISSIONS: not followed, files need to be executable: git-version-gen, some in debian/
+# * FILE_PATH_CHANGES: we don't use a MAINTAINERS file
+# * FUNCTION_WITHOUT_ARGS: not followed: warns about func() instead of func(void)
+# * GLOBAL_INITIALISERS: we initialise globals to NULL for talloc ctx (e.g. *tall_lapd_ctx = NULL)
+# * IF_0: used intentionally
+# * INITIALISED_STATIC: we use this, see also http://lkml.iu.edu/hypermail/linux/kernel/0808.1/2235.html
+# * LINE_SPACING: we don't always put a blank line after declarations
+# * REPEATED_WORD: false positives in doxygen descriptions (e.g. '\param[in] data Data passed through...')
+# * SPDX_LICENSE_TAG: we don't place it on line 1
+# * SPLIT_STRING: we do split long messages over multiple lines
+# * STRING_FRAGMENTS: sometimes used intentionally to improve readability
+
+$SCRIPT_DIR/checkpatch.pl \
+	--exclude lint/checkpatch \
+	--ignore ASSIGN_IN_IF \
+	--ignore AVOID_EXTERNS \
+	--ignore BLOCK_COMMENT_STYLE \
+	--ignore CONSTANT_COMPARISON \
+	--ignore EMBEDDED_FUNCTION_NAME \
+	--ignore EXECUTE_PERMISSIONS \
+	--ignore FILE_PATH_CHANGES \
+	--ignore FUNCTION_WITHOUT_ARGS \
+	--ignore GLOBAL_INITIALISERS \
+	--ignore IF_0 \
+	--ignore INITIALISED_STATIC \
+	--ignore LINE_SPACING \
+	--ignore REPEATED_WORD \
+	--ignore SPDX_LICENSE_TAG \
+	--ignore SPLIT_STRING \
+	--ignore STRING_FRAGMENTS \
+	--max-line-length 120 \
+	--no-signoff \
+	--no-tree \
+	"$@"

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/24701
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0ec6a3bc57a4d31c821fa83370f05c6d4ac2a5b0
Gerrit-Change-Number: 24701
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210616/dc1fa00d/attachment.htm>


More information about the gerrit-log mailing list