From c505851ff0a86670315edf7919417b816ff1ac90 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 8 Jan 2023 09:51:56 -0800 Subject: [PROPOSED] =?UTF-8?q?Improve=20=E2=80=98make=20check=5Ftables?= =?UTF-8?q?=E2=80=99=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * checktab.awk: Fix check that comments are present in zone1970.tab if the country has multiple timezones, even when the country code is not listed last in column 1. --- checktab.awk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/checktab.awk b/checktab.awk index 23e0a3a5..2dbf485f 100644 --- a/checktab.awk +++ b/checktab.awk @@ -107,6 +107,7 @@ BEGIN { cc = cca[j] if (used_max < cc_used[cc]) { used_max = cc_used[cc] + used_max_cc = cc } } if (used_max <= 1 && comments) { @@ -114,9 +115,9 @@ BEGIN { zone_table, i, comments \ >>"/dev/stderr" status = 1 - } else if (1 < cc_used[cc] && !comments) { + } else if (1 < used_max && !comments) { printf "%s:%d: missing comment for %s\n", \ - zone_table, i, cc \ + zone_table, i, used_max_cc \ >>"/dev/stderr" status = 1 } -- 2.37.2