From b5cffb23c20788320ff484c5435d4c98b9f0e36c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 2 Feb 2026 00:53:12 -0800 Subject: [PATCH 1/2] use pre-commit clang-format 15.0.7 --- .pre-commit-config.yaml | 11 +++-------- tools/clang-format.sh | 24 ------------------------ 2 files changed, 3 insertions(+), 32 deletions(-) delete mode 100755 tools/clang-format.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2601df03a..baf697990 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,14 +13,10 @@ # limitations under the License. repos: - - repo: local + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: "ea59a72ffc9a1ce6b79b02a8076d031aa7ea7805" # v15.0.7 hooks: - id: clang-format - name: clang-format - language: python - entry: tools/clang-format.sh - args: [clang-format] - additional_dependencies: ["clang-format>=15,<16"] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 @@ -30,12 +26,11 @@ repos: exclude: conda-recipe/meta\.yaml$ - id: check-added-large-files - id: check-illegal-windows-names - - id: check-json - files: \.json$ - id: check-merge-conflict - id: check-toml files: \.toml$ - id: end-of-file-fixer - id: trailing-whitespace args: [--markdown-linebreak-ext=md] + exclude: .*\.svg$ - id: mixed-line-ending diff --git a/tools/clang-format.sh b/tools/clang-format.sh deleted file mode 100755 index f87a7cdde..000000000 --- a/tools/clang-format.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# Allow users to supply a custom path to `clang-format` -CLANGFORMAT="${1:-clang-format}" -DIRECTORIES=( "bindings/python/src" "bindings/python/include" "bindings/cpp" "include" "benchmark" "tests" "utils" "examples/cpp" ) - -for i in "${DIRECTORIES[@]}" -do - find "./$i" \( -iname "*.h" -o -iname "*.cpp" \) ! -iname "*toml_impl.h" | xargs "$CLANGFORMAT" -i -done From f921ef3e9efa8519d0181dc0e214e629418c0d21 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 2 Feb 2026 00:54:46 -0800 Subject: [PATCH 2/2] run pre-commit on all files --- .github/renovate.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 5db72dd6a..93afd4a43 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,6 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] }