File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11## Some ` Bash ` coding conventions and good practices.
22
33Coding conventions are... just conventions.
4- It helps to have a little fun with scripting,
4+ They help to have a little fun with scripting,
55not to create new war/bias conversations.
66
77Feel free to break the rules any time you can; it's important
@@ -23,6 +23,7 @@ And it's also important to have a consistent way in your scripts.
2323 * [ Set -u] ( #set--u )
2424 * [ Set -e] ( #set--e )
2525* [ Techniques] ( #techniques )
26+ * [ Keep that in mind] ( #keep-that-in-mind )
2627 * [ A little tracing] ( #a-little-tracing )
2728 * [ Making your script a library] ( #making-your-script-a-library )
2829 * [ Quick self-doc] ( #quick-self-doc )
@@ -297,6 +298,15 @@ For more details about `set -e`, please read
297298
298299## Techniques
299300
301+ ### Keep that in mind
302+
303+ There are lot of shell scripts that don't come with (unit)tests.
304+ It's just not very easy to write tests. Please keep that in mind:
305+ Writing shell scripts is more about dealing with runtime and side effects.
306+
307+ It's very hard to refactor shell scripts.
308+ Be prepared, and don't hate bash/shell scripts too much ;)
309+
300310### A little tracing
301311
302312It would be very helpful if you can show in your script logs some tracing
You can’t perform that action at this time.
0 commit comments