+48
−0
Loading
Add Bash styling checks using shellcheck: https://github.com/koalaman/shellcheck Shellcheck can be used in check_format just like astyle and pep8 to improve our bash scripts quality by checking for syntax errors. It could also allow us to enforce (at least to some extent) consistent coding style - using $() instead of backticks for command calls, string quoting, etc. Shellcheck maintains it's own wiki with error descriptions: https://github.com/koalaman/shellcheck/wiki/ To check for specific error go to, for example: https://github.com/koalaman/shellcheck/wiki/SC2006 Each wiki entry includes an example of problematic code, an example of suggested correct code and a rationale. Currently all of the found problems are excluded in check_format.sh and will be fixed incrementally. Change-Id: Ib1d6f628e101e0e2b2d56956b679942630a73f95 Signed-off-by:Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463172 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Paul Luse <paul.e.luse@intel.com> Reviewed-by:
Seth Howell <seth.howell@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com>