Commits on Aug 21, 2026
-
pgindent: Use git ls-files to discover files
When running pgindent on the whole source tree, it would often also indent build artifacts. This changes the pgindent directory search logic to become git-aware, and only indent files that are actually tracked by git. Any files that are explicitly part of the pgindent its arguments, are always indented though, even if they are not tracked by git. This can be useful to force indentation of an untracked file and/or for editor integration.
-
pgindent: Default to indenting the current directory if no files are …
…given Previously running pgindent without giving it any files would result in this output: src/tools/pgindent/pgindent No files to process at src/tools/pgindent/pgindent line 526. This instead indents the current directory, which is probably what the user intended.
JelteF authored and Commitfest Bot committed
Aug 21, 2026 -
pgindent: Allow parallel pgindent runs
Running pgindent on the whole source tree can take a while. This adds support for pgindent to indent files in parallel. This speeds up a full pgindent run from ~7 seconds to 1 second on my machine. Especially with future commits that integrate perltidy into pgindent the wins are huge, because perltidy is much slower at formatting than pg_bsd_indent. With those later commits the time it takes to do a full pgindent run (including perltidy) takes more than a minute on my machine without the parallelization, but only take ~7 seconds when run in parallel.
JelteF authored and Commitfest Bot committed
Aug 21, 2026 -
pgindent: Try to find pg_bsd_indent binary in common locations
To run pgindent you need to to have the right version of pg_bsd_indent in your PATH, or specify it manually. This is a bit of a hassle, especially for newcomers or when working on backbranches. So this chnages pgindent to search for a pg_bsd_indent that's built from the current sources, both in-tree (for in-tree autoconf builds) and in a build directory (for meson or autoconf vpath builds).
JelteF authored and Commitfest Bot committed
Aug 21, 2026 -
Move pgindent to separate pgcheck script
Over time our pgindent script has gotten a lot of quality of life features, like the --commit, --diff, --check, and --jobs flags. Our pgperltidy, pgperlcritic and pgperlsyncheck are missing these features. In the next commit these other tools will gain these quality of life features too, by introducing a new tool called "pgcheck" that combines the functionality of all tools. This commit only does: git mv src/tools/pgindent/pgindent src/tools/pgcheck/pgcheck The resulting pgcheck script is not even functional, since some of the hardcoded relative paths in the script are now incorrect. The only reason this is separate from the next commit, is to to make git understand that we moved the pgindent file, so the git history of the pgindent file is transferred over correctly to the pgcheck file.
JelteF authored and Commitfest Bot committed
Aug 21, 2026 -
Combine all formatting and linting tools into pgcheck
Over time our pgindent script has gotten a lot of quality of life features, like the --commit, --diff, --check, and --jobs flags. Our pgperltidy, pgperlcritic and pgperlsyncheck scripts were missing all these features. This commit introduces a new tool called "pgcheck" that combines the functionality of all these tools, so all of them can benefit from the improvements that have been made to pgindent. The old scripts are still available as simple wrappers around pgcheck.
JelteF authored and Commitfest Bot committed
Aug 21, 2026 -
pgcheck: Add easy way of getting perltidy
pgcheck needs a very specific perltidy version, but getting that installed is quite a hassle. Especially for people who don't use perl on a daily basis. This commit adds a small script to download the exact perltidy version that we need and install it locally in the repo. It also teaches pgcheck to use that locally installed perltidy if it is available.
JelteF authored and Commitfest Bot committed
Aug 21, 2026