You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -126,11 +126,37 @@ branch that is checked out in a separate worktree.
126
126
git log --stat -p aaaaaa...bbbbbb
127
127
```
128
128
129
+
## Polishing a change
130
+
131
+
Prior to pushing your change, remember to run [clang-format] on the `.c`,
132
+
`.cpp`, and `.h` files, since the [clang-format workflow] may fail otherwise.
133
+
You can do so by running the following command.
134
+
135
+
```
136
+
./scripts/clang-format.sh --verbose
137
+
```
138
+
139
+
To match the exact formatting expected by the [clang-format version in the
140
+
workflow], you will need to obtain [clang version 13.0.0] and add its `bin`
141
+
directory to `PATH`. If you are using RHEL/CentOS or SLES/openSUSE, try
142
+
installing one of the `clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-*.tar.xz`
143
+
that is compatible with the libc and libstdc++ versions provided by your
144
+
distribution.
145
+
146
+
If you wish to format a committed or staged file, you can use clang-format git
147
+
integration, [git-clang-format]. The main benefit of `git clang-format` is the
148
+
ability to format a specific commit or only staged files.
149
+
129
150
[Intel organization]: https://github.com/intel
130
151
[Intel® FPGA Runtime for OpenCL™ Software Technology]: https://github.com/intel/fpga-runtime-for-opencl
152
+
[clang version 13.0.0]: https://github.com/llvm/llvm-project/releases/tag/llvmorg-13.0.0
153
+
[clang-format version in the workflow]: https://github.com/intel/fpga-runtime-for-opencl/blob/fc99b92704a466f7dc4d84bd45d465d64d03dbb0/container/ubuntu-20.04-clang/Dockerfile#L9
[create a forked repository]: https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository
132
157
[fork and pull model]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/about-collaborative-development-models#fork-and-pull-model
0 commit comments