-
Notifications
You must be signed in to change notification settings - Fork 59
fix shell check error for case-lib/* #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Wait for CI system detect error |
marc-hb
left a comment
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.
Thanks for doing all these fixes, will make future reviews much easier! See comments below.
case-lib/opt.sh
Outdated
| else | ||
| [ "${OPT_VALUE_lst[$i]}" -eq 0 ] && echo -e "\t""Default Value: Off" \ | ||
| || echo -e "\t""Default Value: On" | ||
| echo -e "\t""Default Value: On" |
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.
Avoid echo, use printf
printf '\tDefault Value: '
if [ "${OPT_PARM_lst[$i]}" -eq 1 ]; then
printf '%s\n' "${OPT_VALUE_lst[$i]}"
...
printf 'On\n'| if [ $# -lt 1 ]; then | ||
| dlogi "Topology file name is not specified, unable to run command: ${BASH_SOURCE[-1]}" && exit 1 | ||
| dlogi "Topology file name is not specified, unable to run command: $SCRIPT_NAME" | ||
| exit 1 |
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.
die()
| tplg_path=$(func_lib_get_tplg_path "$1") || { | ||
| dloge "No available topology for pipeline export" | ||
| exit 1 | ||
| } |
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.
die()
|
About the [WIP] : if you submit the PR as a "github draft" then no reviewer will be automatically added. It's too late now, you can't go back to Draft. Next time. |
Not too late apparently. It can always be converted back and review requests re-sent. |
fix shell check error and cleanup some useless code Signed-off-by: Wu, BinX <binx.wu@intel.com>
1. remove _func_logcmd_add_timestamp function direct to use 'alais' for the dlog* command 2. fix shell check error 3. remove some useless code Signed-off-by: Wu, BinX <binx.wu@intel.com>
1. refine option for sof-tplgreader format 2. fix shell check error and remove some useless code Signed-off-by: Wu, BinX <binx.wu@intel.com>
fix shell check error and remove some useless code Signed-off-by: Wu, BinX <binx.wu@intel.com>
fix shell check error and remove some useless code Signed-off-by: Wu, BinX <binx.wu@intel.com>
use readarray instead of IFS readarray make code more simple and clean It also fix shell check error This change refer hijack.sh: exit lib.sh: func_lib_disable_pulseaudio pipeline.sh: func_pipeline_export
Already verify on CI system |
|
@marc-hb I already try with |
Use single quotes on that, otherwise the shell will eat the |
|
Exactly: always single quote the format string: printf 'format: \t%s\nstring: \t%d' "$arg1" "$arg2"a='pri\nt_this'
echo -e "value:\t$a"
printf 'val:\t%s\n' "$a" |
echo command with '-e' option will hide the control char for the output string replace with printf '%s' to instead of it Signed-off-by: Wu, BinX <binx.wu@intel.com>
|
@marc-hb Can you help me to review this patch, or you think what I need to update |
marc-hb
left a comment
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.
@marc-hb Can you help me to review this patch, or you think what I need to update
Sorry for the delay, this is a large PR and I don't really understand the changes unrelated to shellcheck. Next time please submit several smaller PRs, one at a time thanks!
It's not only impossible to review changes that large, it's also impossible to test them in a reasonable time. See for instance regression #266 |
Update for fix shell check error for case-lib/*
expect case-lib/config.sh file