This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/24700 )
Change subject: lint/checkpatch: add --exclude argument
......................................................................
lint/checkpatch: add --exclude argument
Apply patch from https://review.coreboot.org/c/coreboot/+/18568/, so we
can exclude specific directories.
Related: OS#5087
Change-Id: Ia980814895249f839873c5002f0d21c0e59ee01d
---
M lint/checkpatch/checkpatch.pl
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
osmith: Verified
diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index 23697a6..2cd5402 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -54,6 +54,7 @@
my @use = ();
my %ignore_type = ();
my @ignore = ();
+my @exclude = ();
my $help = 0;
my $configuration_file = ".checkpatch.conf";
my $max_line_length = 100;
@@ -104,6 +105,7 @@
--list-types list the possible message types
--types TYPE(,TYPE2...) show only these comma separated message types
--ignore TYPE(,TYPE2...) ignore various comma separated message types
+ --exclude DIR(,DIR22...) exclude directories
--show-types show the specific message type in the output
--max-line-length=n set the maximum line length, (default $max_line_length)
if exceeded, warn on patches
@@ -301,6 +303,7 @@
'subjective!' => \$check,
'strict!' => \$check,
'ignore=s' => \@ignore,
+ 'exclude=s' => \@exclude,
'types=s' => \@use,
'show-types!' => \$show_types,
'list-types!' => \$list_types,
@@ -2806,6 +2809,16 @@
$found_file = 1;
}
+ my $skipme = 0;
+ foreach (@exclude) {
+ if ($realfile =~ m@^(?:$_/)@) {
+ $skipme = 1;
+ }
+ }
+ if ($skipme) {
+ next;
+ }
+
#make up the handle for any error we report on this line
if ($showfile) {
$prefix = "$realfile:$realline: "
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/24700
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ia980814895249f839873c5002f0d21c0e59ee01d
Gerrit-Change-Number: 24700
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210617/a3057d22/attachment.htm>