Skip to content

Commit 5788b98

Browse files
authored
Add pre-commit instructions to CONTRIBUTING.md (#1606)
Signed-off-by: hiaselhans <[email protected]>
1 parent 1d13f84 commit 5788b98

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

CONTRIBUTING.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,23 @@ for more information.
7777
- Create a personal fork of the project on GitHub
7878
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
7979
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
80-
- Prepare your patch (follow
81-
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html)).
82-
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [clang-tidy](
83-
https://clang.llvm.org/extra/clang-tidy/) tools can be integrated into your
84-
workflow to ensure formatting and stylistic compliance of your changes.
80+
- Prepare your patch
81+
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
82+
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
83+
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be integrated into your
84+
workflow to ensure formatting and stylistic compliance of your changes.
85+
- use
86+
```
87+
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
88+
```
89+
to check the format of your current changes against the `origin/sycl` branch.
90+
- `-f` to also correct unstaged changes
91+
- `--diff` to only print the diff without applying
8592
- Build the project and run all tests.
93+
- complete test suite: `python buildbot/check.py`
94+
- sycl test suite `python buildbot/check.py -t test-sycl`
95+
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
96+
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
8697
8798
### Commit message
8899

0 commit comments

Comments
 (0)