Change in osmo-ci[master]: lint: checkpatch.pl: exclude pattern, not dir

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.org
Wed Jul 7 09:26:48 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/24865 )


Change subject: lint: checkpatch.pl: exclude pattern, not dir
......................................................................

lint: checkpatch.pl: exclude pattern, not dir

Allow to exclude files in a follow-up commit, not just directories.

Related: OS#5087
Change-Id: Ic3990fba60060c331c479174183924b9cdbdb4c8
---
M lint/checkpatch/checkpatch.pl
M lint/checkpatch/checkpatch_osmo.sh
2 files changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/65/24865/1

diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index 2cd5402..dc56812 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -105,7 +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
+  --exclude PATTERN(,P2...)  exclude pattern
   --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
@@ -2811,7 +2811,7 @@
 
 		my $skipme = 0;
 		foreach (@exclude) {
-			if ($realfile =~ m@^(?:$_/)@) {
+			if ($realfile =~ m@$_@) {
 				$skipme = 1;
 			}
 		}
diff --git a/lint/checkpatch/checkpatch_osmo.sh b/lint/checkpatch/checkpatch_osmo.sh
index 0a5c65f..7d55e98 100755
--- a/lint/checkpatch/checkpatch_osmo.sh
+++ b/lint/checkpatch/checkpatch_osmo.sh
@@ -2,7 +2,7 @@
 SCRIPT_DIR="$(dirname "$(realpath "$0")")"
 
 # Excluded paths:
-# * lint/checkpath: so it does not warn about spelling errors in spelling.txt :)
+# * ^lint/checkpath/: so it does not warn about spelling errors in spelling.txt :)
 
 # Ignored checks:
 # * ASSIGN_IN_IF: not followed (e.g. 'if ((u8 = gsup_msg->cause))')
@@ -23,7 +23,7 @@
 # * STRING_FRAGMENTS: sometimes used intentionally to improve readability
 
 $SCRIPT_DIR/checkpatch.pl \
-	--exclude lint/checkpatch \
+	--exclude '^lint/checkpatch/' \
 	--ignore ASSIGN_IN_IF \
 	--ignore AVOID_EXTERNS \
 	--ignore BLOCK_COMMENT_STYLE \

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/24865
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ic3990fba60060c331c479174183924b9cdbdb4c8
Gerrit-Change-Number: 24865
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210707/71840504/attachment.htm>


More information about the gerrit-log mailing list