You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATM produced shell scripts do not adhere to the best practices of writing shell scripts . You can use https://www.shellcheck.net/ tool to see what is wrong with them, e.g.
here is an example of running on a sample produced script
❯ shellcheck /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh
In /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh line 7:
echo I\'m in$PWD using `which python`
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
^------------^ SC2046 (warning): Quote this to prevent word splitting.
^------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
echo I\'m in"$PWD" using $(which python)
In /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh line 8:
path_check_setup=/home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup
^--------------^ SC2034 (warning): path_check_setup appears unused. Verify use (or exportif used externally).
In /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh line 18:
which_python=`which python`
^------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
Did you mean:
which_python=$(which python)
In /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh line 20:
echo'Calling `test_job.py`...'
^------------------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.In /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/call_test_job.sh line 21:${which_python} /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/test_job.py --path-workspace ${current_pwd} --path-check-setup /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.Did you mean: ${which_python} /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setup/test_job.py --path-workspace "${current_pwd}" --path-check-setup /home/yoh/proj/misc/babs/.testdata/babs_test_project/test_project/analysis/code/check_setupFor more information: https://www.shellcheck.net/wiki/SC2034 -- path_check_setup appears unused. ... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
The text was updated successfully, but these errors were encountered:
Summary
ATM produced shell scripts do not adhere to the best practices of writing shell scripts . You can use https://www.shellcheck.net/ tool to see what is wrong with them, e.g.
here is an example of running on a sample produced script
The text was updated successfully, but these errors were encountered: