Skip to content

Commit

Permalink
Use new clang-format in CI
Browse files Browse the repository at this point in the history
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:
#511 (comment)

This starts using the correct clang-format version in CI too and formats
any incorrectly formatted files.
  • Loading branch information
JelteF committed Jan 3, 2025
1 parent b4878e4 commit 0415609
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pgduckdb_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ ConvertBinaryDatum(const duckdb::Value &value) {
auto str = value.GetValueUnsafe<duckdb::string_t>();
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);
Expand Down

0 comments on commit 0415609

Please sign in to comment.