Skip to content

Commit 7053dc7

Browse files
committed
Using bootstrap.sh to set some options
1 parent 29e7542 commit 7053dc7

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

.circleci/shellcheck.sh

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
#!/usr/bin/env bash
22

3-
# Sets some Bash options to encourage well formed code.
4-
# For example, some of the options here will cause the script to terminate as
5-
# soon as a command fails. Another option will cause an error if an undefined
6-
# variable is used.
7-
# See: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
8-
9-
# Any trap on ERR is inherited by shell functions, command substitutions, and
10-
# commands executed in a subshell environment. The ERR trap is normally not
11-
# inherited in such cases.
12-
set -o errtrace
13-
14-
# Any trap on DEBUG and RETURN are inherited by shell functions, command
15-
# substitutions, and commands executed in a subshell environment. The DEBUG and
16-
# RETURN traps are normally not inherited in such cases.
17-
set -o functrace
18-
19-
# Exit if any command exits with a non-zero exit status.
20-
set -o errexit
21-
22-
# Exit if script uses undefined variables.
23-
set -o nounset
24-
25-
# Prevent masking an error in a pipeline.
26-
# Look at the end of the 'Use set -e' section for an excellent explanation.
27-
# see: https://www.davidpashley.com/articles/writing-robust-shell-scripts/
28-
set -o pipefail
29-
30-
# Make debugging easier when you use `set -x`
31-
# See: http://wiki.bash-hackers.org/scripting/debuggingtips#making_xtrace_more_useful
32-
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
3+
# shellcheck source=./modules/bash-commons/src/os.sh
4+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../modules/bash-commons/src/bootstrap.sh"
335

346
function run_shellcheck {
357
local -r format="${1}"

0 commit comments

Comments
 (0)