TRI-ML / dgp

ML Dataset Governance Policy for Autonomous Vehicle Datasets
https://tri-ml.github.io/dgp/
MIT License
94 stars 62 forks source link

feat: move more linters from SuperLinter to pre-commit #122

Closed tk-woven closed 1 year ago

tk-woven commented 1 year ago

Description

This is toward #114 . This moves more linting from SuperLinter to pre-commit. In particular, it moves

For gitleaks, we have to use a Docker-wrapped hook ID to avoid having our end-users manually install the gitleaks tool themselves. Also, SuperLinter suggests that it runs shfmt but is not entirely clear about it (since its configuration is for shellcheck).


This change is Reviewable

tk-woven commented 1 year ago

Also, note that we use check-json in place of SuperLinter's eslint because eslint is not automatically installed. We'd have to ask end-users to manually install it (if outside of Docker), which I find annoying.

tk-woven commented 1 year ago

Ah, also note that DGP has no checked-in shell files from what I can tell. However, to preserve SuperLinter coverage, we add shell-checking hooks since SuperLinter would provide them to us the moment we (maybe) introduce shell files.