Skip to content

Commit

Permalink
doc: link to array issue in code
Browse files Browse the repository at this point in the history
Hopefully makes it easier for people eager to understand better
what we're trying to achieve.
  • Loading branch information
jbergstroem committed Apr 11, 2021
1 parent 3fd5bd6 commit f33da64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/jq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function exit_if_found_in_json() {
# A bit finicky - we lean on jq to pass an error code. If this happens,
# bash will simply exit since we use `set -o pipefail`
# @TODO: support passing needle as array to avoid calling twice via "warning, error"
# https://github.com/jbergstroem/hadolint-gh-action/issues/3
jq -e --arg needle "${1}" \
-r 'def count(s): reduce s as $_ (0;.+1); count(.[] |
select(.level == $needle)) | . == 0' &> /dev/null
Expand Down

0 comments on commit f33da64

Please sign in to comment.