-
Notifications
You must be signed in to change notification settings - Fork 132
Update the action and inherit ansible-lint arguments #7
Update the action and inherit ansible-lint arguments #7
Conversation
- a relevant set of arguments is inherited (i.e., arguments like --help or -L are filtered out) - write action.yml file Signed-off-by: Marek Cermak <macermak@redhat.com> new file: action.yml modified: entrypoint.sh
Signed-off-by: Marek Cermak <macermak@redhat.com> modified: entrypoint.sh
This prevents potential misunderstendings since ansible-lint does not implicitly recorse directories, which might not be the expected behaviour with default '.' value. Signed-off-by: Marek Cermak <macermak@redhat.com> modified: action.yml
- be more explicit in the `targets` description Signed-off-by: Marek Cermak <macermak@redhat.com> modified: action.yml modified: readme.md
Fixes: #6 |
Thanks for the contribution @CermakM. |
Doing some more test @CermakM, but so far it looks promising. |
@stoe any update on this? |
entrypoint.sh
Outdated
@@ -1,30 +1,98 @@ | |||
#! /usr/bin/env bash | |||
|
|||
set -eo pipefail | |||
set -euo pipefail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do even better:
set -euo pipefail | |
set -Eeuo pipefail |
entrypoint.sh
Outdated
exit 1 | ||
fi | ||
local opts=$(parse_args "$@" || exit 1) | ||
if [ "$opts" = "" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clause is totally unnecessary.
Sorry for the delay, I overcommitted on my initial promise.
That would be ✨ amazing. |
@CermakM if you're not willing to rewrite it into Python, I can merge it for now and do it myself once I have time. If you need any directions, feel free to reach out to me and we could even meet @ TPB-C. |
Signed-off-by: Marek Cermak <macermak@redhat.com> modified: entrypoint.sh
@webknjaz Ye, rewriting it to Python would be great, we could add some unit tests to it then as well. If it is possible, however, I would leave it to a separate PR (it would take some time to re-write it to Python and test it all over again). So if we could merge this one, it'd be great. PS: Removed the don't-know-how-it-got-there if clause. Thanks for the comment. |
ansible-lint
(see the READMEAn example run can be found here.