con / tributors

Pay tribute to your contributors! A tool to automatically update contributor files.
https://con.github.io/tributors/
Apache License 2.0
13 stars 6 forks source link

Add shellcheck workflow, and tune up docker/entrypoint.sh to become clean #71

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

Primarily constituted addressing two following warnings from shellcheck:

In entrypoint.sh line 55:
if [ ! -z "${INPUT_UPDATE_LOOKUP}" ]; then
     ^-- SC2236 (style): Use -n instead of ! -z.

In entrypoint.sh line 60:
printf "Run zenodo: ${RUN_ZENODO}\n"
       ^---------------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".

and for consistency I replaced all other uses of 'printf' with simple 'echo'.

Note: tests/*.sh were not treated and neither added to shellcheck workflow. Wanted first to assess if such changes are desired, can do similar act for tests if agreed to proceed.

yarikoptic commented 1 year ago

@vsoch ping -- any blessing or objections?

vsoch commented 1 year ago

No objections! But if you are bringing in different linting, I'd recommend pre-commit https://github.com/koalaman/shellcheck-precommit and then add black/ isort and others there. I've been using it for most of my python projects and it's magical.

Not a hard requirement, just a suggestion for a nice developer experience. :sparkles:

yarikoptic commented 1 year ago

yeah, we also use pre-commit in dandi-cli. I love and not it ;) someone might at some point in the future. Let's proceed with this for now as is.