diff options
| author | Joe Kirchoff <[email protected]> | 2022-04-05 13:56:02 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-05 13:56:02 -0700 |
| commit | 3a33d040ddaaa9634ca4fab04e3182e7a8313547 (patch) | |
| tree | c463890deaec7fb7c524f18de70e893797477fec /CODING.md | |
| parent | Minor formatting fix (diff) | |
| download | zen-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.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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. |