-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shellcheck to all repositories #289
Comments
Since |
Hey, I would like to work on this. And I would appreciate if you tell, in which file of repository we are adding shell check? |
Hey @MustkimKhatik, we want to add shell-check to all 4 of our repos. The Python-based repos all use Adding it to the frontend would be more contrived but you can start with these ^ three. |
Alright! I would work on this three! |
btw this pre-commit syntax will go as it is or there are any changes in |
@MustkimKhatik I think we can skip the |
Alright we will do that |
Hey @dhruvkb, For frontend, workaround is same? because there is no |
@MustkimKhatik We'd have to add it as an additional workflow job in the CI/CD for the frontend repository. This could be done with this action, for example: https://github.com/marketplace/actions/shellcheck Alternatively, Dhruv has been working on getting pre-commit into the frontend repository in this PR: WordPress/openverse-frontend#1862 Maybe helping on that PR would be a good way to go about this as well. Getting pre-commit in the frontend would help unify our linting across all repositories. |
Okay @sarayourfriend, maybe adding ShellCheck directly into pre-commit will be more convenient instead of additional workflow job. I would definitely look for it. |
Closing this as all our active repos are now using pre-commit with a nearly identical config that includes ShellCheck. |
* Simplify loader workflow, move operator definitions into DAG * Add more comments, skip on the first task rather than continue * Change trigger rule on table drop * There should really only be one of these at a time (for now) This could change if this DAG is triggered automatically from the provider DAGs. * Fix op kwarg, change DAG so drop table only runs after create table * Update tests * Add per-task documentation
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.
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
The text was updated successfully, but these errors were encountered: