Standards
This is the single source of truth for coding and naming standards at The Data Shed.
General
While the above describe standards and tooling appropriate to each language or framework, there are some which apply to all projects.
pre-commit
Git hooks are a means by which automated action can be taken for certain events in the Git lifecycle.
pre-commit
is a framework for managing a variety of
tools, specifically for the
pre-commit
hook.
- all projects SHOULD make use of
pre-commit
; - any project using
pre-commit
MUST make use of itsautoupdate
feature; - any project using
pre-commit
MUST run all hooks as part of the CI/CD pipeline.
There are some tools which SHOULD be used on every project, where appropriate:
markdownlint-cli
: most projects have aREADME.md
and such documents should be validated bymarkdownlint
;detect-secrets
: needless to say, the accidental addition of sensitive data to a project should be avoided;gitleaks
: similar todetect-secrets
, this aims to prevent to accidental addition of sensitive values.
If you use pre-commit hooks for other
stages,
such as commitizen
that's
for the commit-msg
stage, then you can simplify the usage by adding the
following top-level options to your .pre-commit-config.yaml
file: