Skip to content
Merged
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
4 changes: 2 additions & 2 deletions scripts/run-shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export SC_JOBS
test -n "$SC_TIMEOUT" || export SC_TIMEOUT=30
test 0 -lt "$SC_TIMEOUT" || exit $?

# skip files containing Jinja2 template syntax ({{ }}, {% %}, {# #})
# skip files containing Jinja2 template syntax ({{{ }}}, {% %}, {# #})
test -n "$SC_SKIP_JINJA" || export SC_SKIP_JINJA=0

# directory for shellcheck results
Expand Down Expand Up @@ -79,7 +79,7 @@ filter_shell_scripts() {
apply_exclusion() {
while read -r i; do
# skip Jinja2 templates if requested
if [ "$SC_SKIP_JINJA" -eq 1 ] && grep -qE '\{\{|\{%|\{#' "$i" 2>/dev/null; then
if [ "$SC_SKIP_JINJA" -eq 1 ] && grep -qP '\{\{\{|\{%|(?<!\$)\{#' "$i" 2>/dev/null; then
continue
fi

Expand Down