bash
bash copied to clipboard
How to write good bash code using TDD
TDD Bash
Even though shell scripting was present in every development team that I have worked in, it was almost never tested. Over time, everyone becomes afraid to change code without tests because it might break. This fear grows proportionally with the importance of the code.
This repository is meant to capture the mechanics and reasoning behind test-driven bash code. It also conveys the process behind evolving a good bash codebase.
How to write good bash code?
- Understand the bash pitfalls
- Use shellcheck
- Emphasise on functional code
- Discover the simplest concepts
- Explore their optimal composition
- Use containers for integration testing
- Stop when the fun stops