git: fb4e70bad0bf - main - MOVEDlint: Test the first and second field for spaces
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Aug 2022 13:16:32 UTC
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fb4e70bad0bf832a2bb41986f6ec37d3f03d06db
commit fb4e70bad0bf832a2bb41986f6ec37d3f03d06db
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-08-23 13:14:08 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-08-23 13:16:19 +0000
MOVEDlint: Test the first and second field for spaces
both fields should not have spaces in their field, let's make
MOVEDlint check for it
---
Tools/scripts/MOVEDlint.awk | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Tools/scripts/MOVEDlint.awk b/Tools/scripts/MOVEDlint.awk
index 7d6f3dc193d6..af1de6b42ca2 100755
--- a/Tools/scripts/MOVEDlint.awk
+++ b/Tools/scripts/MOVEDlint.awk
@@ -84,6 +84,18 @@ $3 !~ /^20[0-3][0-9]-[01][0-9]-[0-3][0-9]$/ {
next
}
+$1 ~ /[ \t]/ {
+ printf "%5d: '%s' contains spaces\n", NR, $1 | sort
+ error[NR] = 1
+ next
+}
+
+$2 ~ /[ \t]/ {
+ printf "%5d: '%s' contains spaces\n", NR, $2 | sort
+ error[NR] = 1
+ next
+}
+
{
if ($1 in srcs) {
printf "%5d: %s has duplicate entries\n", NR, $1 | sort