postgres.git / summary / log / commit / refs
commit cabaee9377948928ec0913e8d81213f7904d63da
Author: Peter Eisentraut <peter@eisentraut.org>
Date: Thu Nov 12 10:23:45 2026 +0000
Add missing exclude_file_patterns
Many generated files were not listed. Some files had been moved but
not updated here.
Apparently, not many people run pgindent in a configuration that is
affected by this omission. Either the generated files are built
out-of-tree, or they would get reindented but then ignored via
gitignore. But if you run pgindent --check --diff, then they will get
indented and differences will show up.
Discussion: https://www.postgresql.org/message-id/flat/c344c048-cd65-4440-a00f-61b2c9062351%40eisentraut.org
src/tools/pgindent/exclude_file_patterns | 60 +++++++++++++++++++++++++++++---
1 file changed, 56 insertions(+), 4 deletions(-)
diff --git a/src/tools/pgindent/exclude_file_patterns b/src/tools/pgindent/exclude_file_patterns
index 4976a373f9e..cc7cee27e4c 100644
--- a/src/tools/pgindent/exclude_file_patterns
+++ b/src/tools/pgindent/exclude_file_patterns
@@ -9,22 +9,73 @@ src/include/jit/llvmjit\.h$
src/include/jit/SectionMemoryManager\.h$
#
# These are generated files with incomplete code fragments that
-# confuse pgindent.
+# confuse pgindent. (make and meson generate these in different
+# directories.)
src/backend/nodes/\w+\.funcs\.c$
src/backend/nodes/\w+\.switch\.c$
+src/include/nodes/\w+\.funcs\.c$
+src/include/nodes/\w+\.switch\.c$
#
# These are generated by generate-wait_event_types.pl, whose format
# looks worse with pgindent.
-src/backend/utils/activity/pgstat_wait_event\.c$
-src/backend/utils/activity/wait_event_funcs_data\.c$
-src/backend/utils/activity/wait_event_types\.h$
+src/backend/utils/pgstat_wait_event\.c$
+src/backend/utils/wait_event_funcs_data\.c$
+src/backend/utils/wait_event_types\.h$
+src/include/utils/pgstat_wait_event\.c$
+src/include/utils/wait_event_funcs_data\.c$
+src/include/utils/wait_event_types\.h$
#
# This confuses pgindent, and it's a derived file anyway.
src/backend/utils/fmgrtab\.c$
+src/include/utils/fmgrtab\.c$
#
# pgindent might mangle entries in this that match typedef names.
# Since it's a derived file anyway, just exclude it.
src/backend/utils/fmgrprotos\.h$
+src/include/utils/fmgrprotos\.h$
+#
+# Other generated files.
+src/backend/nodes/nodetags\.h$
+src/include/nodes/nodetags\.h$
+src/backend/storage/lmgr/lwlocknames\.h$
+src/include/storage/lwlocknames\.h$
+src/backend/utils/errcodes\.h$
+src/include/utils/errcodes\.h$
+src/backend/utils/fmgroids\.h$
+src/include/utils/fmgroids\.h$
+src/backend/utils/guc_tables\.inc\.c$
+src/include/utils/guc_tables\.inc\.c$
+src/include/catalog/pg_\w+_d\.h$
+src/include/catalog/schemapg\.h$
+src/include/catalog/syscache_ids\.h$
+src/include/catalog/syscache_info\.h$
+src/include/catalog/system_fk_info\.h$
+src/include/generated-[\w-]+-stamp\.h$
+contrib/fuzzystrmatch/daitch_mokotoff\.h$
+src/bin/psql/sql_help\.[ch]$
+src/bin/psql/tab-complete\.c$
+src/common/unicode/norm_test_table\.h$
+src/interfaces/ecpg/include/ecpg_config\.h$
+src/pl/plperl/perlchunks\.h$
+src/pl/plperl/plperl_opmask\.h$
+src/pl/plpgsql/src/plerrcodes\.h$
+src/pl/plpython/spiexceptions\.h$
+src/pl/tcl/pltclerrcodes\.h$
+src/port/pg_config_paths\.h$
+src/include/pg_config_paths\.h$
+#
+# The build creates these as symlinks to (or copies of) files that live
+# elsewhere in the tree, where they are indented in their own right.
+src/backend/port/pg_sema\.c$
+src/backend/port/pg_shmem\.c$
+src/bin/initdb/localtime\.c$
+src/bin/pg_rewind/xlogreader\.c$
+src/bin/pg_waldump/xlogreader\.c$
+src/bin/pg_waldump/xlogstats\.c$
+# ... the rmgrdesc files, except pg_waldump's own rmgrdesc.c
+src/bin/pg_waldump/(?!rmgrdesc\.c$)\w*desc\w*\.c$
+src/include/pg_config_os\.h$
+src/interfaces/ecpg/preproc/typename\.c$
#
# kwlist_d files are made by gen_keywordlist.pl. While we could insist that
# they match pgindent style, they'd look worse not better, so exclude them.
@@ -49,6 +100,7 @@ src/interfaces/ecpg/test/.*/
# so we shouldn't expect them to conform to our style.
# (Some versions of dtrace build probes.h files that confuse pgindent, too.)
src/backend/utils/probes\.h$
+src/include/utils/probes\.h$
src/include/pg_config\.h$
src/pl/plperl/ppport\.h$
src/pl/plperl/SPI\.c$
[parent: cf44f3fa19b6]