<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/24700">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lint/checkpatch: add --exclude argument<br><br>Apply patch from https://review.coreboot.org/c/coreboot/+/18568/, so we<br>can exclude specific directories.<br><br>Related: OS#5087<br>Change-Id: Ia980814895249f839873c5002f0d21c0e59ee01d<br>---<br>M lint/checkpatch/checkpatch.pl<br>1 file changed, 13 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/00/24700/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 23697a6..2cd5402 100755</span><br><span>--- a/lint/checkpatch/checkpatch.pl</span><br><span>+++ b/lint/checkpatch/checkpatch.pl</span><br><span>@@ -54,6 +54,7 @@</span><br><span> my @use = ();</span><br><span> my %ignore_type = ();</span><br><span> my @ignore = ();</span><br><span style="color: hsl(120, 100%, 40%);">+my @exclude = ();</span><br><span> my $help = 0;</span><br><span> my $configuration_file = ".checkpatch.conf";</span><br><span> my $max_line_length = 100;</span><br><span>@@ -104,6 +105,7 @@</span><br><span>   --list-types               list the possible message types</span><br><span>   --types TYPE(,TYPE2...)    show only these comma separated message types</span><br><span>   --ignore TYPE(,TYPE2...)   ignore various comma separated message types</span><br><span style="color: hsl(120, 100%, 40%);">+  --exclude DIR(,DIR22...)   exclude directories</span><br><span>   --show-types               show the specific message type in the output</span><br><span>   --max-line-length=n        set the maximum line length, (default $max_line_length)</span><br><span>                              if exceeded, warn on patches</span><br><span>@@ -301,6 +303,7 @@</span><br><span>    'subjective!'   => \$check,</span><br><span>       'strict!'       => \$check,</span><br><span>       'ignore=s'      => \@ignore,</span><br><span style="color: hsl(120, 100%, 40%);">+       'exclude=s'     => \@exclude,</span><br><span>     'types=s'       => \@use,</span><br><span>         'show-types!'   => \$show_types,</span><br><span>  'list-types!'   => \$list_types,</span><br><span>@@ -2806,6 +2809,16 @@</span><br><span>                         $found_file = 1;</span><br><span>             }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+         my $skipme = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+               foreach (@exclude) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  if ($realfile =~ m@^(?:$_/)@) {</span><br><span style="color: hsl(120, 100%, 40%);">+                               $skipme = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+                  }</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+             if ($skipme) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        next;</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #make up the handle for any error we report on this line</span><br><span>              if ($showfile) {</span><br><span>                     $prefix = "$realfile:$realline: "</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/24700">change 24700</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/+/24700"/><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: Ia980814895249f839873c5002f0d21c0e59ee01d </div>
<div style="display:none"> Gerrit-Change-Number: 24700 </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>