<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/24918">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved; Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lint: checkpatch.pl: allow spaces below (g)DEFUN<br><br>Do not complain if indenting with exactly 6/7 spaces below (g)DEFUN(,<br>as it's often done in VTY-related code in Osmocom. This patch assumes<br>that if the line starts with 6/7 spaces and " or a word, it's probably<br>below DEFUN( or gDEFUN(. I've considered implementing a more accurate<br>check, but that would be too much effort (e.g. when more macros are<br>involved).<br><br>Other related macros, such as DEFUN_ATTR are longer. Indentation below<br>those should be done with one tab (+ spaces for padding), the linter<br>doesn't need to be adjusted for those.<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;"><span>diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl</span><br><span>index ad99e0c..4da42a9 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(' or 'gDEFUN('</span><br><span style="color: hsl(120, 100%, 40%);">+               $line !~ /^\+ {6,7}["\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: 2 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>