-
Notifications
You must be signed in to change notification settings - Fork 51
Conversation
Signed-off-by: MustkimKhatik <83959074+MustkimKhatik@users.noreply.github.com>
@MustkimKhatik Could you edit your comment to fill the Pull Request template? Thanks! |
Sure. |
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.
ShellCheck has reported several changes that need to be made for the lint check to pass.
Sure @dhruvkb I'll do it |
@MustkimKhatik there are still some lint changes needed. Do you need help fixing those? |
Yes @dhruvkb , I'll do them by myself as I got the time |
syntax correction in run_test.sh
Some corrections in run_test
some corrections in run_test
syntax correction in ingestion_sever/run_test.sh
syntax correction in update_mocks.sh
syntax correction in run_test.sh
syntax correction in load_sample.sh
hey @dhruvkb, can you look into the error it detecting? |
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.
Good to go from my end 👍! Feel free to work on something else while we wait for a second approval.
Okay sure! Thanks for helping me out with it. |
ingestion_server/test/run_test.sh
Outdated
printf "%s:-) All tests passed${endcol}\n" "${green}" | ||
else | ||
printf "${red}:'( Some tests did not pass${endcol}\n" | ||
printf "\n\n%s:'( Some tests did not pass${endcol}\n" "${red}" |
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.
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.
IIRC it was a ShellCheck recommendation to use %s
, I'll look into it.
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.
Yep it was ShellCheck recommendation, and I guess ANSI color code declared was wrong, instead of red="\e[31m"
it should be red="\e[41m"
and for green instead of green="\e[32m"
it should be green="\e[42m"
. something mentioned here
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.
@MustkimKhatik the color codes were correct, the issue was that %s
escapes the ANSI code which makes them lose their effect. Using %b
instead fixes the issue as seen in b9b21bd.
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.
@MustkimKhatik the color codes were correct, the issue was that
%s
escapes the ANSI code which makes them lose their effect. Using%b
instead fixes the issue as seen in b9b21bd.
Oh alright, that must clear all the things 🙌
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.
That fixed it for me, thanks @dhruvkb!
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.
Thank you for the changes @MustkimKhatik! This worked great locally
Adding shell check to openverse-api repo