Skip to content

Commit 3a71b09

Browse files
authored
upgrade to clang-format-14 (#834)
1 parent 84b511b commit 3a71b09

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/test-linux.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
- name: Install Doxygen
3434
run: |
3535
sudo apt update
36-
sudo apt-get install doxygen graphviz clang-format-11
36+
sudo apt-get install doxygen graphviz clang-format-14
3737
3838
- name: Configure build
3939
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DWARNINGS_AS_ERRORS=ON .
4040

4141
- name: Formatting check
4242
working-directory: build
4343
run: |
44-
clang-format-11 --version
44+
clang-format-14 --version
4545
make format
4646
git diff --exit-code
4747
@@ -93,15 +93,15 @@ jobs:
9393
- name: Install Doxygen
9494
run: |
9595
sudo apt update
96-
sudo apt-get install doxygen graphviz clang-format-11
96+
sudo apt-get install doxygen graphviz clang-format-14
9797
9898
- name: Configure build
9999
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DWARNINGS_AS_ERRORS=ON -DCMAKE_C_FLAGS="${{ matrix.compile_opt }}" .
100100

101101
- name: Formatting check
102102
working-directory: build
103103
run: |
104-
clang-format-11 --version
104+
clang-format-14 --version
105105
make format
106106
git diff --exit-code
107107

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ endfunction()
381381
add_h3_library(h3 "")
382382

383383
# Automatic code formatting
384-
# Give preference to clang-format-11
385-
find_program(CLANG_FORMAT_PATH NAMES clang-format-11 clang-format)
384+
# Give preference to clang-format-14
385+
find_program(CLANG_FORMAT_PATH NAMES clang-format-14 clang-format)
386386
cmake_dependent_option(
387387
ENABLE_FORMAT "Enable running clang-format before compiling" ON
388388
"CLANG_FORMAT_PATH" OFF)

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Planned improvements and changes are discussed in Github issues. Feel free to op
1010
* Please include fuzzer tests for public API functions.
1111
* Please add a description of your change to the Unreleased section of the [changelog](./CHANGELOG.md).
1212
* Please open issues to discuss large features or changes which would break compatibility, before submitting pull requests.
13-
* Please keep H3 compatible with major C compilers, such as GCC, Clang, and MSVC. We use clang-format-11 for source code formatting, if you have another version the CI job may error on formatting differences.
13+
* Please keep H3 compatible with major C compilers, such as GCC, Clang, and MSVC. We use clang-format-14 for source code formatting, if you have another version the CI job may error on formatting differences.
1414
* Please keep code coverage of the core H3 library at 100%.
1515

1616
Before we can merge your changes, you must agree to the [Uber Contributor License Agreement](https://cla-assistant.io/uber/h3).

website/docs/core-library/compilation-options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ but is rather the documentation for the internal C library functions.
7777

7878
## ENABLE_FORMAT
7979

80-
Whether to enable using clang-format-11 to format source files before building. This should be enabled
80+
Whether to enable using clang-format-14 to format source files before building. This should be enabled
8181
before submitting patches for H3 as continuous integration will fail if the formatting does not match.
8282

8383
Only this version of clang-format should be used to format the sources as new releases of clang-format

website/docs/core-library/testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Coverage information is collected in Coveralls. Because of the self-contained na
1818

1919
| Operating system | Compiler | Build type | Processor architecture | Special notes
2020
| ---------------- | ----------- | -------------- | ---------------------- | -------------
21-
| Linux (Ubuntu) | Clang | Debug, Release | x64 | clang-format-11 is used to ensure all code is consistently formatted
21+
| Linux (Ubuntu) | Clang | Debug, Release | x64 | clang-format-14 is used to ensure all code is consistently formatted
2222
| Linux | Clang | Debug | x64 | An additional copy of the job runs with [Valgrind](https://valgrind.org/)
2323
| Linux | Clang | Debug | x64 | An additional copy of the job runs with coverage reporting, and excerising the `H3_PREFIX` mechanism.
2424
| Linux | gcc | Debug, Release | x64 |

0 commit comments

Comments
 (0)