[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] branch main updated: shellcheck: Fix new warnings



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

The following commit(s) were added to refs/heads/main by this push:
     new d456885dac shellcheck: Fix new warnings
     new 7e055c383c Merge branch 'maint-0.4.7'
d456885dac is described below

commit d456885dac3b5bdfff663ed502fd11f9e0d0e070
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
AuthorDate: Tue Jan 10 09:11:52 2023 -0500

    shellcheck: Fix new warnings
    
    Nothing important, mostly false positive except one case.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 scripts/ci/ci-driver.sh      | 2 +-
 scripts/maint/code-format.sh | 6 ++++++
 src/test/test_include.sh     | 3 +++
 src/test/test_rebind.sh      | 3 +++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/scripts/ci/ci-driver.sh b/scripts/ci/ci-driver.sh
index ef31da1ca3..93d764f262 100755
--- a/scripts/ci/ci-driver.sh
+++ b/scripts/ci/ci-driver.sh
@@ -375,7 +375,6 @@ if [[ "$RUN_STAGE_BUILD" = "yes" ]] ; then
             hooray "Distcheck was successful. Nothing further will be done."
             # We have to exit early here, since we can't do any other tests.
             cp tor-*.tar.gz "${CI_SRCDIR}"/artifacts
-            exit 0
         else
             error "Diagnostics:"
             runcmd make show-distdir-testlog || true
@@ -383,6 +382,7 @@ if [[ "$RUN_STAGE_BUILD" = "yes" ]] ; then
             die "Unable to continue."
         fi
         end_section Distcheck
+        exit 0
     fi
 fi
 
diff --git a/scripts/maint/code-format.sh b/scripts/maint/code-format.sh
index d8f597d70d..5998e96f68 100755
--- a/scripts/maint/code-format.sh
+++ b/scripts/maint/code-format.sh
@@ -160,11 +160,17 @@ if [[ $GITIDX = 1 ]]; then
     # partially staged.
     note "Stashing unstaged changes"
     git stash -q --keep-index
+    # For some reasons, shellcheck is not seeing that we can call this
+    # function from the trap below.
+    # shellcheck disable=SC2317
     function restoregit() {
         note "Restoring git state"
         git stash pop -q
     }
 else
+    # For some reasons, shellcheck is not seeing that we can call this
+    # function from the trap below.
+    # shellcheck disable=SC2317
     function restoregit() {
         true
     }
diff --git a/src/test/test_include.sh b/src/test/test_include.sh
index 6cf695fe44..10d3bc502d 100755
--- a/src/test/test_include.sh
+++ b/src/test/test_include.sh
@@ -48,6 +48,9 @@ if "${TOR_BINARY}" --list-modules | grep -q "relay: no"; then
 fi
 
 tmpdir=
+# For some reasons, shellcheck is not seeing that we can call this
+# function from the trap below.
+# shellcheck disable=SC2317
 clean () {
   if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
     rm -rf "$tmpdir"
diff --git a/src/test/test_rebind.sh b/src/test/test_rebind.sh
index 879008c1c1..aae2a9a6a0 100755
--- a/src/test/test_rebind.sh
+++ b/src/test/test_rebind.sh
@@ -46,6 +46,9 @@ if "${TOR_BINARY}" --list-modules | grep -q "relay: no"; then
 fi
 
 tmpdir=
+# For some reasons, shellcheck is not seeing that we can call this
+# function from the trap below.
+# shellcheck disable=SC2317
 clean () {
   if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
     rm -rf "$tmpdir"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits