Skip to content

Commit

Permalink
test: add shellcheck ignore comments
Browse files Browse the repository at this point in the history
This commit adds `SC2086` shellcheck ignore comments to the
`entrypoint.sh` script. This is needed since the flagged lines require
globbing and word splitting to work.
  • Loading branch information
rickstaa committed Dec 9, 2021
1 parent bac6607 commit 28a2634
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoint.sh
Expand Up @@ -25,10 +25,12 @@ black_exit_val="0"
reviewdog_exit_val="0"
if [[ "${INPUT_REPORTER}" = 'github-pr-review' ]]; then
echo "[action-black] Checking python code with the black formatter and reviewdog..."
# shellcheck disable=SC2086
black_check_output="$(black --diff --quiet --check . ${INPUT_BLACK_ARGS})" ||
black_exit_val="$?"

# Intput black formatter output to reviewdog
# shellcheck disable=SC2086
echo "${black_check_output}" | /tmp/reviewdog -f="diff" \
-f.diff.strip=0 \
-name="${INPUT_TOOL_NAME}" \
Expand All @@ -40,10 +42,12 @@ if [[ "${INPUT_REPORTER}" = 'github-pr-review' ]]; then
else

echo "[action-black] Checking python code with the black formatter and reviewdog..."
# shellcheck disable=SC2086
black_check_output="$(black --check . ${INPUT_BLACK_ARGS} 2>&1)" ||
black_exit_val="$?"

# Intput black formatter output to reviewdog
# shellcheck disable=SC2086
echo "${black_check_output}" | /tmp/reviewdog -f="black" \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER}" \
Expand Down

0 comments on commit 28a2634

Please sign in to comment.