Skip to content
Snippets Groups Projects
Closed (moved) shellcheck: test_key_expiration.sh issues
  • View options
  • shellcheck: test_key_expiration.sh issues

    • View options
  • Closed (moved) created by rl1987
    
    In src/test/test_key_expiration.sh line 9:
    if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then
                              ^--^ SC2086: Double quote to prevent globbing and word splitting.
                                               ^--^ SC2086: Double quote to prevent globbing and word splitting.
    
    
    In src/test/test_key_expiration.sh line 16:
    UNAME_OS=`uname -s | cut -d_ -f1`
             ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
    
    
    In src/test/test_key_expiration.sh line 50:
    check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; }
                                  ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
    
    
    In src/test/test_key_expiration.sh line 51:
    check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: `dump $1` vs `dump $2`"; }
                                                                      ^-------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                                                            ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                                   ^-------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                                                                         ^-- SC2086: Double quote to prevent globbing and word splitting.
    
    
    In src/test/test_key_expiration.sh line 54:
    DATA_DIR=`mktemp -d -t tor_key_expiration_tests.XXXXXX`
             ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
    
    
    In src/test/test_key_expiration.sh line 63:
    trap "rm -rf '$DATA_DIR'" 0
                  ^-------^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.
    
    
    In src/test/test_key_expiration.sh line 66:
    DATA_DIR=`cd "${DATA_DIR}" && pwd`
             ^-----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
    
    For more information:
      https://www.shellcheck.net/wiki/SC2064 -- Use single quotes, otherwise this...
      https://www.shellcheck.net/wiki/SC2015 -- Note that A && B || C is not if-t...
      https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

    Attributes

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first