<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/24701">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lint/checkpatch: add Osmocom specific wrapper<br><br>Related: OS#5087<br>Change-Id: I0ec6a3bc57a4d31c821fa83370f05c6d4ac2a5b0<br>---<br>A lint/checkpatch/checkpatch_osmo.sh<br>1 file changed, 46 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/01/24701/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lint/checkpatch/checkpatch_osmo.sh b/lint/checkpatch/checkpatch_osmo.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..0a5c65f</span><br><span>--- /dev/null</span><br><span>+++ b/lint/checkpatch/checkpatch_osmo.sh</span><br><span>@@ -0,0 +1,46 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh -e</span><br><span style="color: hsl(120, 100%, 40%);">+SCRIPT_DIR="$(dirname "$(realpath "$0")")"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Excluded paths:</span><br><span style="color: hsl(120, 100%, 40%);">+# * lint/checkpath: so it does not warn about spelling errors in spelling.txt :)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Ignored checks:</span><br><span style="color: hsl(120, 100%, 40%);">+# * ASSIGN_IN_IF: not followed (e.g. 'if ((u8 = gsup_msg->cause))')</span><br><span style="color: hsl(120, 100%, 40%);">+# * AVOID_EXTERNS: we do use externs</span><br><span style="color: hsl(120, 100%, 40%);">+# * BLOCK_COMMENT_STYLE: we don't use a trailing */ on a separate line</span><br><span style="color: hsl(120, 100%, 40%);">+# * CONSTANT_COMPARISON: not followed: "Comparisons should place the constant on the right side"</span><br><span style="color: hsl(120, 100%, 40%);">+# * EMBEDDED_FUNCTION_NAME: often __func__ isn't used, arguably not much benefit in changing this when touching code</span><br><span style="color: hsl(120, 100%, 40%);">+# * EXECUTE_PERMISSIONS: not followed, files need to be executable: git-version-gen, some in debian/</span><br><span style="color: hsl(120, 100%, 40%);">+# * FILE_PATH_CHANGES: we don't use a MAINTAINERS file</span><br><span style="color: hsl(120, 100%, 40%);">+# * FUNCTION_WITHOUT_ARGS: not followed: warns about func() instead of func(void)</span><br><span style="color: hsl(120, 100%, 40%);">+# * GLOBAL_INITIALISERS: we initialise globals to NULL for talloc ctx (e.g. *tall_lapd_ctx = NULL)</span><br><span style="color: hsl(120, 100%, 40%);">+# * IF_0: used intentionally</span><br><span style="color: hsl(120, 100%, 40%);">+# * INITIALISED_STATIC: we use this, see also http://lkml.iu.edu/hypermail/linux/kernel/0808.1/2235.html</span><br><span style="color: hsl(120, 100%, 40%);">+# * LINE_SPACING: we don't always put a blank line after declarations</span><br><span style="color: hsl(120, 100%, 40%);">+# * REPEATED_WORD: false positives in doxygen descriptions (e.g. '\param[in] data Data passed through...')</span><br><span style="color: hsl(120, 100%, 40%);">+# * SPDX_LICENSE_TAG: we don't place it on line 1</span><br><span style="color: hsl(120, 100%, 40%);">+# * SPLIT_STRING: we do split long messages over multiple lines</span><br><span style="color: hsl(120, 100%, 40%);">+# * STRING_FRAGMENTS: sometimes used intentionally to improve readability</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$SCRIPT_DIR/checkpatch.pl \</span><br><span style="color: hsl(120, 100%, 40%);">+       --exclude lint/checkpatch \</span><br><span style="color: hsl(120, 100%, 40%);">+   --ignore ASSIGN_IN_IF \</span><br><span style="color: hsl(120, 100%, 40%);">+       --ignore AVOID_EXTERNS \</span><br><span style="color: hsl(120, 100%, 40%);">+      --ignore BLOCK_COMMENT_STYLE \</span><br><span style="color: hsl(120, 100%, 40%);">+        --ignore CONSTANT_COMPARISON \</span><br><span style="color: hsl(120, 100%, 40%);">+        --ignore EMBEDDED_FUNCTION_NAME \</span><br><span style="color: hsl(120, 100%, 40%);">+     --ignore EXECUTE_PERMISSIONS \</span><br><span style="color: hsl(120, 100%, 40%);">+        --ignore FILE_PATH_CHANGES \</span><br><span style="color: hsl(120, 100%, 40%);">+  --ignore FUNCTION_WITHOUT_ARGS \</span><br><span style="color: hsl(120, 100%, 40%);">+      --ignore GLOBAL_INITIALISERS \</span><br><span style="color: hsl(120, 100%, 40%);">+        --ignore IF_0 \</span><br><span style="color: hsl(120, 100%, 40%);">+       --ignore INITIALISED_STATIC \</span><br><span style="color: hsl(120, 100%, 40%);">+ --ignore LINE_SPACING \</span><br><span style="color: hsl(120, 100%, 40%);">+       --ignore REPEATED_WORD \</span><br><span style="color: hsl(120, 100%, 40%);">+      --ignore SPDX_LICENSE_TAG \</span><br><span style="color: hsl(120, 100%, 40%);">+   --ignore SPLIT_STRING \</span><br><span style="color: hsl(120, 100%, 40%);">+       --ignore STRING_FRAGMENTS \</span><br><span style="color: hsl(120, 100%, 40%);">+   --max-line-length 120 \</span><br><span style="color: hsl(120, 100%, 40%);">+       --no-signoff \</span><br><span style="color: hsl(120, 100%, 40%);">+        --no-tree \</span><br><span style="color: hsl(120, 100%, 40%);">+   "$@"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/24701">change 24701</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ci/+/24701"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I0ec6a3bc57a4d31c821fa83370f05c6d4ac2a5b0 </div>
<div style="display:none"> Gerrit-Change-Number: 24701 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>