Description
Problem
We've made a few easy to avoid mistakes in shell scripts
WordPress/openverse-frontend#1640
WordPress/openverse-api#869
These can be avoided using shellcheck and following it's basic advice (always adding set -e
, actual syntax checks, etc).
Description
Add shellcheck to all repositories. Even if any of these repositories don't have shell scripts, let's add it now before we introduce a shell script and forget about this. It doesn't hurt, after all.
- WordPress/openverse (Update .pre-commit-config.yaml #300)
- WordPress/openverse-catalog (Add ShellCheck to pre-commit config openverse-catalog#718)
- WordPress/openverse-api (Adding shellcheck to openverse-api openverse-api#922)
- WordPress/openverse-frontend (Replace Husky and lint-staged with pre-commit openverse-frontend#1862)
Side note
It'd be nice if we used pre-commit on all repositories instead of having the frontend repository be the odd ball using husky
. If we used pre-commit everywhere then we could just sync the pre-commit configuration and automagically have things working for all languages across all repositories the same way. I'll open another issue to think about that for the frontend repo.
Implementation
- 🙋 I would be interested in implementing this feature.