ACCESS-NRI / dev-docs

ACCESS-NRI internal development documentation
Apache License 2.0
0 stars 0 forks source link

Automated CI/CD linting tools #8

Open headmetal opened 1 year ago

headmetal commented 1 year ago

Creating a new issue from the below comments expanded from issue #3.

Suggestions, comments and thoughts on appropriate/good tools for automated code evaluation.


However, if we want to include linting checks in our CI/CD we probably need to agree on tools. Originally posted by @rbeucher in https://github.com/ACCESS-NRI/dev-docs/issues/3#issuecomment-1530780277


As it happens just came across pre-commit.ci which touts itself as a free service to enable automatic linting and other checks using the pre-commit framework.

"WOW!" I hear you say, "that looks peachy!".

It does eh? The context of noticing it was it failing for a mysterious reason in this PR

https://github.com/ncar-xdev/ecgtools/pull/148

Mysterious failures are not great for a largely automatic service over which you have little to no control. Any comments? Originally posted by @aidanheerdegen in https://github.com/ACCESS-NRI/dev-docs/issues/3#issuecomment-1530793564


Have a look at the Ruff linter for CI Originally posted by @harshula in https://github.com/ACCESS-NRI/dev-docs/issues/3#issuecomment-1535544682


dougiesquire commented 1 year ago

Mysterious failures are not great for a largely automatic service over which you have little to no control. Any comments? Originally posted by @aidanheerdegen in https://github.com/ACCESS-NRI/dev-docs/issues/3#issuecomment-1530793564

If there are issues with precommit.ci, it's very easy to set-up a pre-commit workflow, e.g.

aidanheerdegen commented 1 year ago

Should add https://www.shellcheck.net linting for all shell scripts

aidanheerdegen commented 1 year ago

BTW Dale added this to the hh5 conda environment, so it is available on gadi

https://github.com/coecms/conda-envs/issues/46