From 4fdaad14befd7e8c06161ff57e9055fbbecc2a02 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Mon, 6 Jan 2025 09:47:03 +0100 Subject: [PATCH] Use new clang-format in CI (#518) In #496 we started using the newest clang-format to format our files, but CI was still installing the old version. This meant that we were not catching some unformatted files correctly. An example of this being: https://github.com/duckdb/pg_duckdb/pull/511#discussion_r1901376718 This starts using the correct clang-format version in CI too and formats any incorrectly formatted files. --- .github/workflows/build_and_test.yaml | 4 ++-- src/pgduckdb_types.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 8d0efa41..af8ca0ed 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -19,8 +19,8 @@ jobs: with: python-version: "3.11" - - name: Install clang-format (11.0.1) and ruff - run: python3 -m pip install "clang-format==11.0.1" ruff + - name: Install clang-format and ruff + run: python3 -m pip install -r dev_requirements.txt - name: Run clang-format run: git clang-format refs/remotes/origin/main --diff - name: Run ruff check diff --git a/src/pgduckdb_types.cpp b/src/pgduckdb_types.cpp index 79255354..e1d09ba2 100644 --- a/src/pgduckdb_types.cpp +++ b/src/pgduckdb_types.cpp @@ -205,7 +205,7 @@ ConvertBinaryDatum(const duckdb::Value &value) { auto str = value.GetValueUnsafe(); auto blob_len = str.GetSize(); auto blob = str.GetDataUnsafe(); - bytea* result = (bytea *)palloc0(blob_len + VARHDRSZ); + bytea *result = (bytea *)palloc0(blob_len + VARHDRSZ); SET_VARSIZE(result, blob_len + VARHDRSZ); memcpy(VARDATA(result), blob, blob_len); return PointerGetDatum(result);