Skip to content

Commit

Permalink
Update clang-format to 16.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Oct 4, 2023
1 parent 2c99613 commit c21dc20
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions cmake/Modules/FindClangTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ endif()

find_program(CLANG_FORMAT_BIN
NAMES
clang-format-16
clang-format-15
clang-format-14
clang-format-13
clang-format-12
Expand Down
2 changes: 1 addition & 1 deletion cmake/TileDB-Superbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ set(SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/scripts")

find_package(ClangTools)
if (NOT ${CLANG_FORMAT_FOUND})
find_program(CLANG_FORMAT_BIN NAMES clang-format-14 clang-format-13 clang-format-12 clang-format-11 clang-format-10 clang-format-9 clang-format-8 clang-format-7 clang-format-6.0 clang-format-5.0 clang-format-4.0)
find_program(CLANG_FORMAT_BIN NAMES clang-format-16 clang-format-15 clang-format-14 clang-format-13 clang-format-12 clang-format-11 clang-format-10 clang-format-9 clang-format-8 clang-format-7 clang-format-6.0 clang-format-5.0 clang-format-4.0)
if(CLANG_FORMAT_BIN)
set(CLANG_FORMAT_FOUND TRUE)
endif()
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/check_formatting_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

set -e pipefail

# Install clang-format (v9)
# Install clang-format
ls -la
sudo ./scripts/install-clangformat.sh

src=$GITHUB_WORKSPACE
cd $src

$src/scripts/run-clang-format.sh $src clang-format-14 0
$src/scripts/run-clang-format.sh $src clang-format-16 0
4 changes: 2 additions & 2 deletions scripts/install-clangformat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ die() {

install_apt_pkg() {
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' &&
apt-get update -qq && apt-get install -qq -y clang-format-14
add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' &&
apt-get update -qq && apt-get install -qq -y clang-format-16
}

install_brew_pkg() {
Expand Down

0 comments on commit c21dc20

Please sign in to comment.