chore: Add hadolint check for Dockerfiles (#322)

Co-authored-by: Balazs Hamorszky <balihb@gmail.com>
This commit is contained in:
Maksym Vlasov 2022-01-11 19:20:29 +02:00 committed by GitHub
commit 47229003ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 18 deletions

View file

@ -73,8 +73,8 @@ function infracost_breakdown_ {
}; then
check="${check:1:-1}"
fi
# shellcheck disable=SC2207 # Can't find working `read` command
operations=($(echo "$check" | grep -oE '[!<>=]{1,2}'))
mapfile -t operations < <(echo "$check" | grep -oE '[!<>=]{1,2}')
# Get the very last operator, that is used in comparison inside `jq` query.
# From the example below we need to pick the `>` which is in between `add` and `1000`,
# but not the `!=`, which goes earlier in the `jq` expression