Skip to contentSkip to conversation

scripts/checkpatch: Fix MAINTAINERS update warning with --terse

PATCH In review Markus Armbruster 2 participants 2 messages Jan 9 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/checkpatch: Fix MAINTAINERS update warning with --terse

We recently improved the MAINTAINERS update warning to show the files that trigger it. Example:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #105:
deleted file mode 100644

improved to

WARNING: added, moved or deleted file(s):

migration/threadinfo.h
migration/threadinfo.c

Does MAINTAINERS need updating?

Unfortunately, this made things worse with --terse, as only the first line of each warning is shown then.

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?

became

WARNING: added, moved or deleted file(s):

Adjust the warning text to

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
migration/threadinfo.h
migration/threadinfo.c

so we get the exact same warning as we used to with --terse.

Fixes 1d745e6d9635 (scripts/checkpatch: use new hook for MAINTAINERS update check)
---
 scripts/checkpatch.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +3 -3
index 3a9557417f..6f270becdc 100755
@@ -1473,9 +1473,9 @@ sub process_file_list {
 
 	# If we don't see a MAINTAINERS update, prod the user to check
 	if (int(@maybemaintainers) > 0 && !$sawmaintainers) {
-		WARN("added, moved or deleted file(s):\n\n  " .
-		     join("\n  ", @maybemaintainers) .
-		     "\n\nDoes MAINTAINERS need updating?\n");
+                WARN("added, moved or deleted file(s),"
+		     " does MAINTAINERS need updating?\n  "
+		     . join("\n  ", @maybemaintainers));
 	}
 }
 
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Markus Armbruster

We recently improved the MAINTAINERS update warning to show the files that trigger it. Example:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #105:
deleted file mode 100644

improved to

WARNING: added, moved or deleted file(s):

migration/threadinfo.h
migration/threadinfo.c

Does MAINTAINERS need updating?

Unfortunately, this made things worse with --terse, as only the first line of each warning is shown then.

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?

became

WARNING: added, moved or deleted file(s):

Adjust the warning text to

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
migration/threadinfo.h
migration/threadinfo.c

Quoted 7 lines

so we get the exact same warning as we used to with --terse.

Fixes 1d745e6d9635 (scripts/checkpatch: use new hook for MAINTAINERS update check)
---
 scripts/checkpatch.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|