HomeDevCentral

Enable pre-commit

Description

Enable pre-commit

Summary:
To offer a better repository linting experience,
a lot of tests can be done locally quickly.

Provide pre-commit Git hook using the pre-commit framework
with linters for Python (black), shell scripts (shellcheck),
JSON, XML, YAML, Salt states (salt-lint) and regular files.

Fixes T1715.

Test Plan:

  • make
  • pre-commit run --all-files

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1715

Differential Revision: https://devcentral.nasqueron.org/D2635

Details

Provenance
derecksonAuthored on Mar 26 2022, 14:20
derecksonPushed on Mar 26 2022, 14:25
Reviewer
dereckson
Differential Revision
D2635: Enable pre-commit
Parents
rOPS270e2f7aef71: Avoid tidy/lint repository commits in git blame
Branches
Unknown
Tags
Unknown
Tasks
T1715: Deploy pre-commit on rOPS