bash-it
bash-it copied to clipboard
BATS: `shellcheck`
Description
As shellcheck supports BATS syntax, turn it on and use it! And then fix all the tests!
Motivation and Context
This is chapter 3 of my BATS adventure. This is for the tests themselves, not the main code/libraries/plugins. This ensures that our tests are working properly.
NOTE: this does NOT enable "strict mode" in BATS, it's still just shellcheck.
How Has This Been Tested?
Lots and lots and lots of test/run...
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code follows the code style of this project.
- [x] If my change requires a change to the documentation, I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [x] If I have added a new file, I also added it to
clean_files.txtand formatted it usinglint_clean_files.sh. - [x] I have added tests to cover my changes, and all the new and existing tests pass.
Ok! This one should be good to go. This just does shellcheck, not shfmt and not anything else. (I'll do shfmt in another PR.)