5 Commits

Author SHA1 Message Date
Sven Klemm
5c0939e035 Make clang-format sort includes
To reduce amount of noise due to include sorting have clang-format
enforce consistent sorting across all includes.
2024-05-25 20:05:20 +02:00
Lakshmi Narayanan Sreethar
4bd704f3fc Further code cleanup after PG12 removal
Removed PG12 specific code guarded by the PG13_LT and PG13_GE macros.
2023-08-11 00:31:48 +05:30
Alexander Kuzmenkov
7758f5959c Update .clang-format for version 14
The only configuration we're missing is the newline for braces after
case labels. The rest of the differences looks like bugs/omissions of
the version 8 that we use now.

Require clang-format-14 in cmake and use it in the CI check. We can't
support versions earlier than 14 because they have some
formatting differences that can't be configured.
2022-10-10 17:12:36 +03:00
Sven Klemm
b1a9c3b7b7 Add support for PG13 List implementation
PG13 changes the List implementation from a linked list to an array
while most of the API functions did not change a few them have slightly
different signature in PG13, additionally the list_make5 functions
got removed.

https://github.com/postgres/postgres/commit/1cff1b95ab
2021-01-04 11:18:33 +01:00
Matvey Arye
cc52a78b9b Add scripts for clang-format
We are switching from pgindent to clang-format for several
reasons:
1) pgindent is harder to set up and depends on other tools
like gobjdump that differ between OSes making it harder
to set up a proper development environment.
2) clang-format is more standard and works better
with various IDEs and editors.

Our clang-format wrapper script is transactional in that this
version of the script copies all files to a temporary directory,
runs clang-format in the temp dir, and only then copies the files
back. This should prevent mis-formatting when the script is cancled
in the middle of running.

We changes travis to use clang-format instead of pgindent
and thus it uses a different docker image to do the format test.
We also changes travis to use the new clang docker
image for the license check and prefix checks for consistency.
This also paves the way for us to use more clang features for tests
in the future.
2019-02-05 16:55:16 -05:00