Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: suppress ShellCheck wa...



details:   https://anonhg.NetBSD.org/src/rev/3750ef49e7fb
branches:  trunk
changeset: 1022275:3750ef49e7fb
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 11 12:07:14 2021 +0000

description:
tests/lint: suppress ShellCheck warnings for intentional violations

The undeclared variables are generated by the AWK program.
The variable 'flags' must be split into words at exactly this point.

diffstat:

 tests/usr.bin/xlint/lint1/accept.sh |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r d0b612203f03 -r 3750ef49e7fb tests/usr.bin/xlint/lint1/accept.sh
--- a/tests/usr.bin/xlint/lint1/accept.sh       Sun Jul 11 10:51:46 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/accept.sh       Sun Jul 11 12:07:14 2021 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: accept.sh,v 1.1 2021/06/29 09:44:25 rillig Exp $
+# $NetBSD: accept.sh,v 1.2 2021/07/11 12:07:14 rillig Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -44,6 +44,7 @@
                ln_file="$base.ln"
 
                configure_test_case "$cfile"
+               # shellcheck disable=SC2154
                if [ $skip = yes ]; then
                        continue
                fi
@@ -52,6 +53,8 @@
                        ln_file='/dev/null'
                fi
 
+               # shellcheck disable=SC2154
+               # shellcheck disable=SC2086
                if "$lint1" $flags "$base.c" "$ln_file" > "$tmpfile"; then
                        if [ -s "$tmpfile" ]; then
                                echo "$base produces output but exits successfully"



Home | Main Index | Thread Index | Old Index