I'm trying to use reviewdog/action-actionlint:v1.18.2 and I'm getting this error:
shellcheck reported issue in this script: SC2046:warning:1:35: Quote this to prevent word splitting [shellcheck]
at this line:
run: |
echo "COMMIT_COUNT=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)" >> $GITHUB_ENV
what should I do ?
It's saying that it wants you to replace this:
With this:
This is so that if the output of
git describe --tags --abbrev=0contains a space for some reason, a space will end up in the argument togit rev-list, instead of two arguments being passed. I don't think the output of that particular command will ever actually contain a space, but it's a good practice to quote anyway unless you actually want splitting to happen.