-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run clang-format on the repo, add a github action to check formatting (…
…#577) * Add clang-format directives to order includes * Run clang-format.sh on the entire repo * Add previous formatting commit to ignored revisions This allows anyone to ignore the commit with: git blame --ignore-revs-file .git-blame-ignore-revs Or to always use the ignore-revs file: git config blame.ignoreRevsFile .git-blame-ignore-revs * Fix some include orders * Add a github action to check clang-format * Reference formatting in README and PR template * Use .clang-format-ignore for github action The github action expects a .clang-format-ignore file in order to exclude files, so I've renamed it. It also expects the entries to match the full path as far as I can tell, so I've switched them to be regexes rather than plain filenames.
- Loading branch information
Showing
100 changed files
with
5,178 additions
and
4,898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^<roaring/' | ||
Priority: 2 | ||
- Regex: '^"' | ||
Priority: 3 | ||
- Regex: '.*' | ||
Priority: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.*microbenchmarks/performancecounters/ibireme.h | ||
.*microbenchmarks/performancecounters/linux-perf-events.h | ||
.*microbenchmarks/performancecounters/event_counter.h | ||
.*microbenchmarks/performancecounters/apple_arm_events.h | ||
.*microbenchmarks/toni_ronnko_dirent.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ran clang-format on the entire repo. | ||
fd112ff5799e265fe172b3d28ff17388af108eb7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Before submitting this PR, run `tools/clang-format.sh` on your changes. See the "Contributing" section in the README for details. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: clang-format | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: DoozyX/clang-format-lint-action@v0.17 | ||
with: | ||
source: '.' | ||
exclude: './cmake' | ||
extensions: 'c,h,hh,cpp' | ||
clangFormatVersion: 17 | ||
style: file # Use .clang-format at repo root | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.