<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/24918">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lint: checkpatch.pl: allow spaces below DEFUN<br><br>Do not complain if indenting with exactly 6 spaces below DEFUN(, as it's<br>often done in VTY-related code in Osmocom. This patch assumes that if<br>the line starts with 6 spaces and " or a word, it's probably below<br>DEFUN(. I've considered implementing a more accurate check, but that<br>would be too much effort (e.g. when macros are involved).<br><br>Related: OS#5087<br>Change-Id: I0934b63a62500e7a3e09c753cc63aa331e580cc6<br>---<br>M lint/checkpatch/checkpatch.pl<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/18/24918/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl</span><br><span>index ad99e0c..834b435 100755</span><br><span>--- a/lint/checkpatch/checkpatch.pl</span><br><span>+++ b/lint/checkpatch/checkpatch.pl</span><br><span>@@ -3973,7 +3973,9 @@</span><br><span> #  1) within comments</span><br><span> #  2) indented preprocessor commands</span><br><span> #  3) hanging labels</span><br><span style="color: hsl(0, 100%, 40%);">-                if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/)  {</span><br><span style="color: hsl(120, 100%, 40%);">+                if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/ &&</span><br><span style="color: hsl(120, 100%, 40%);">+             # Osmocom specific, below 'DEFUN('</span><br><span style="color: hsl(120, 100%, 40%);">+                    $line !~ /^\+ {6}["\w].*$/)  {</span><br><span>                      my $herevet = "$here\n" . cat_vet($rawline) . "\n";</span><br><span>                      if (WARN("LEADING_SPACE",</span><br><span>                           "please, no spaces at the start of a line\n" . $herevet) &&</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/24918">change 24918</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/+/24918"/><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: I0934b63a62500e7a3e09c753cc63aa331e580cc6 </div>
<div style="display:none"> Gerrit-Change-Number: 24918 </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>