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/cb9f0264dbc5
branches:  trunk
changeset: 984539:cb9f0264dbc5
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 1eea53bd722a -r cb9f0264dbc5 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