Skip to content

Commit

Permalink
tests: Fix shellcheck issue SC2148 by adding a shell directive
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger committed Jan 30, 2023
1 parent b40fc82 commit c2b54e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ check-display:
.PHONY: syntax-check
syntax-check:
# SC2009: Consider using pgrep instead of grepping ps output.
# SC2148: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
shellcheck -e SC2009,SC2148 \
shellcheck -e SC2009 \
$(TESTS) $(TEST_UTILS) $(filter _test_%,$(EXTRA_DIST))

check: check-am check-display
2 changes: 2 additions & 0 deletions tests/load_vtpm_proxy
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

# shellcheck shell=bash

# For the license, see the LICENSE file in the root directory.

# Some distros may not have the device
Expand Down
1 change: 1 addition & 0 deletions tests/test_common
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# shellcheck disable=SC2043
# shellcheck shell=bash
# For the license, see the LICENSE file in the root directory.

function wait_for_file()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cuse
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

# shellcheck shell=bash

# For the license, see the LICENSE file in the root directory.

if ! [[ "$(uname -s)" =~ Linux ]]; then
Expand Down

0 comments on commit c2b54e6

Please sign in to comment.