aboutsummaryrefslogtreecommitdiffstats
path: root/docs/bash_code_style.rst
AgeCommit message (Collapse)AuthorFilesLines
2023-03-15feat(docs): Hugopmikus1-718/+0
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: Id8b43ef1f31f39b19a0629c52581514fda278f3b
2019-07-10Bash functions style cleanupVratko Polak1-15/+21
+ Update rst documentation for bash style + Command substitution: + Clarify when to use backticks. + Recommend avoiding nested command substitution. + Do not recommend putting command substitution results into quotes. + Function definition content: + Move "set -exuo pipefail" after comment only blocks. + Other set flags allowed for functions with good reasons. + Apply the new recommendations. - Blank lines unified in code but no written recommendation in rst. + Add missing references to functions called, variables read or set. + Add TODOs to where lists would be long. + Minor improvements to function descriptions. + Make "if" expressions more python-like. + Add missing "|| die" (or "|| true") where spotted. + Downgrade DEFAULT_NIC to a local variable. + Add TODO to list reasons for blacklisted tags. Change-Id: I05dce030a8c2cb1b3a242d8b977e8fe150d8ee20 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-27Bash style: Add rules for handling working dirVratko Polak1-0/+94
+ Also added details related to "set -e" and exit codes. Change-Id: I731151efd7facc1def3c8cbba4e466e793c93689 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-27Add tox.ini and few checker scriptsVratko Polak1-2/+1
The plan is to change csit-validate-pylint-master job to fail if (and only if) tox fails. This will allow us to easily add checks, with or without the voting power. Each check produces log (ignored in .gitignore) the voting job can archive. + Made autogen quiet by default, to avoid spam in autogen checker. + Unified the way direct csit subdirectories are git-ignored. Change-Id: I6477b1ef7da6d3e30f68c5850d04900cc52f431e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-18Bash style: Explain some rules for entry and libsVratko Polak1-1/+33
Change-Id: I694ef0c45dfa342651f078d13cc0f7eaaeff82e9 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-02-15CSIT-1135: Add bash code style guide documentVratko Polak1-0/+587
- The document is currently an orphan. Change-Id: I37377e2f7b5e928351336bd18ef037da4d3513fa Signed-off-by: Vratko Polak <vrpolak@cisco.com>