[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] 02/02: maint: avoid a false-positive syntax-check fail
From: |
Jim Meyering |
Subject: |
[automake-commit] 02/02: maint: avoid a false-positive syntax-check failure |
Date: |
Wed, 27 Dec 2023 11:59:21 -0500 |
meyering pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b79e21c53b8e6899ad4616b422d1d1dd32d13d49
commit b79e21c53b8e6899ad4616b422d1d1dd32d13d49
Author: Jim Meyering <meyering@meta.com>
AuthorDate: Wed Dec 27 07:48:17 2023 -0800
maint: avoid a false-positive syntax-check failure
* maintainer/syntax-checks.mk (sc_tests_plain_sleep): This would match
the "sleep 1" in a comment. So filter out shell-style comments before
matching.
---
maintainer/syntax-checks.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index c56313781..40e30d955 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -440,7 +440,8 @@ sc_tests_ls_t:
# Use '$sleep' instead. Some file systems (e.g., Windows) have only
# a 2sec resolution.
sc_tests_plain_sleep:
- @if grep -E '\bsleep +[12345]\b' $(xtests); then \
+ @if grep -vE '^[ ]*#' $(xtests) \
+ | grep -E '\bsleep +[12345]\b' | grep .; then \
echo 'Do not use "sleep x" in the above tests. Use "$$sleep"
instead.' 1>&2; \
exit 1; \
fi