Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
14 changes: 14 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: shellcheck

on:
push:
branches: [master]
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Run shellcheck
run: shellcheck cc.sh
11 changes: 8 additions & 3 deletions cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ execute() {
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
echo "[$mode] $command $input_command" >> "$input_log"
IFS="$lsep"
# shellcheck disable=SC2086
echo "[$mode] "$full_command_list >> "$output_log"
unset IFS
fi
Expand Down Expand Up @@ -437,9 +438,10 @@ export PATH="$new_dirs"

if [ "$mode" = vcheck ]; then
full_command_list="$command"
args="$@"
extend full_command_list vcheck_flags
extend full_command_list args
for arg in "$@"; do
append full_command_list "$arg"
done
execute
fi

Expand Down Expand Up @@ -580,6 +582,7 @@ categorize_arguments() {
eval "\
stripped=\"\${1##$before}\"
"
# shellcheck disable=SC2154 # shellcheck doesn't see eval
if [ "$stripped" = "$1" ] ; then
continue
fi
Expand Down Expand Up @@ -633,6 +636,7 @@ categorize_arguments() {
;;
-Wl,*)
IFS=,
# shellcheck disable=SC2086 # intentional splitting
if ! parse_Wl ${1#-Wl,}; then
append return_other_args_list "$1"
fi
Expand Down Expand Up @@ -803,7 +807,8 @@ case "$mode" in
esac

IFS="$lsep"
categorize_arguments $spack_flags_list
# shellcheck disable=SC2086 # intentional splitting
categorize_arguments $spack_flags_list
unset IFS

assign_path_lists spack_flags_isystem_include_dirs_list return_isystem_include_dirs_list
Expand Down
Loading