ap-airflow icon indicating copy to clipboard operation
ap-airflow copied to clipboard

Add shellcheck pre-commit hook. Fix complaints.

Open danielhoherd opened this issue 4 years ago • 0 comments

What this PR does / why we need it

Add shellcheck pre-commit hook. We have a lot of shell scripts. Gotta keep them working well.

Special notes for your reviewer

While adding this I had to fix a lot of complaints. We should make sure that everything is working as desired. Sometimes scripts have mechanics that rely on invalid syntax, such as needing the value of a variable that has whitespace to whitespace-break, but shellcheck nagged that the var wasn't quoted. We just need to make sure everything here is working as desired, and fix anything that isn't.

In the pre-commit step I also replaced a machine image with the same pre-commit CI image we're using in astronomer/astronomer. This was mostly because I was unable to get the shellcheck hook working with the machine image and pyenv. the shellcheck hook was installing into the wrong pre-commit env, and I'm not sure why.

CI Failures

The trivy failures in CI have nothing to do with this change.

danielhoherd avatar Jan 24 '22 18:01 danielhoherd