bash-it icon indicating copy to clipboard operation
bash-it copied to clipboard

BATS: `shellcheck`

Open gaelicWizard opened this issue 4 years ago • 1 comments

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.txt and formatted it using lint_clean_files.sh.
  • [x] I have added tests to cover my changes, and all the new and existing tests pass.

gaelicWizard avatar Jan 12 '22 07:01 gaelicWizard

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.)

gaelicWizard avatar Mar 04 '22 22:03 gaelicWizard