Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #30002

shellcheck: test_key_expiration.sh issues


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 ...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking