bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sc_prohibit_magic_number_exit false positive on string


From: Darshit Shah
Subject: sc_prohibit_magic_number_exit false positive on string
Date: Sun, 8 Sep 2019 14:56:19 +0200
User-agent: NeoMutt/20180716

I just realized that the syntax check rule sc_prohibit_magic_number_exit will
cause a false positive when it finds the relevant tokens within a string as
well.

For example, in Wget, we have the following snippet in our tests which trips
this rule:

> WGET_TEST_EXPECTED_FILES, &(wget_test_file_t []) {
>       { "exit-status.txt", "exit(8)\n" },
>       {       NULL } },

I made a very tiny change to the rule in maint.mk(L408) to account for this:

-exclude='exit \(77\)|error ?\(((0|77),|[^,]*)'         \
+exclude='exit \(77\)|error ?\(((0|77),|[^,]*)|"(usage|exit|error).*"'          
\

-- 
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]