5 Commits

Author SHA1 Message Date
Mats Kindahl
71e8f13871 Add workflow and CMake support for formatting
Add a workflow to check that CMake files are correctly formatted as
well as a custom target to format CMake files in the repository. This
commit also runs the formatting on all CMake files in the repository.
2021-06-17 22:52:29 +02: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
Joshua Lockerman
bb6efbef0d Check that functions start with the ts_ prefix in travis 2018-12-11 17:02:00 -05:00
Amy Tai
472bf6a298 Add runtime error for pgindent if objdump is not installed 2018-07-11 12:17:46 -04:00
Erik Nordström
69d7d5800c Add pgindent target to format C source
The C source files can now be formatted with pgindent using
a new CMake build target.

The location of pgindent and dependencies are auto-discovered
by CMake or can be overridden on the command line.
2017-11-17 09:43:04 +01:00