aboutsummaryrefslogtreecommitdiff
path: root/CODING.md
diff options
context:
space:
mode:
authorJoe Kirchoff <[email protected]>2022-04-05 13:56:02 -0700
committerGitHub <[email protected]>2022-04-05 13:56:02 -0700
commit3a33d040ddaaa9634ca4fab04e3182e7a8313547 (patch)
treec463890deaec7fb7c524f18de70e893797477fec /CODING.md
parentMinor formatting fix (diff)
downloadzen-3a33d040ddaaa9634ca4fab04e3182e7a8313547.tar.xz
zen-3a33d040ddaaa9634ca4fab04e3182e7a8313547.zip
Add pre-commit config (#69)
* Add .pre-commit-config.yaml * format all using pre-commit clang-format hook * Add pre-commit to inject unreal header comment * Remove prepare_commit.bat & update CODING.md * Remove check-added-large-files, add headers before clang-format
Diffstat (limited to 'CODING.md')
-rw-r--r--CODING.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/CODING.md b/CODING.md
index d94d9d665..54774590f 100644
--- a/CODING.md
+++ b/CODING.md
@@ -12,4 +12,8 @@ Those who are familiar with the UE coding standards will note that we do not req
To ensure consistent formatting we rely on `clang-format` to automatically format source code. This leads to consistent formatting which should lead to less surprises and more straightforward merging.
-Formatting is triggered via `prepare_commit` which should be used ahead of commit. We do not currently reject commits which have not been formatted, but we probably should at some point in the future.
+Formatting is ensured by using [pre-commit](https://pre-commit.com/)
+- [Install pre-commit](https://pre-commit.com/#installation) so it is available in PATH
+- Run pre-commit manually on staged files `pre-commit run`
+- Run pre-commit manually on all files `pre-commit run --all-files`
+- Install git commit hooks `pre-commit install`, which will automatically run before every commit.