diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README index 56f07c7ee4..d36f508827 100644 --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -101,6 +101,10 @@ the comment block with some dashes: Odd spacing around typedef names might indicate an incomplete typedefs list. +pgindent will mangle both declaration and definition of a C function whose +name matches a typedef. Currently the best workaround is to choose +non-conflicting names. + pgindent can get confused by #if sequences that look correct to the compiler but have mismatched braces/parentheses when considered as a whole. Usually that looks pretty unreadable to humans too, so best practice is to rearrange diff --git a/src/tools/pgindent/exclude_file_patterns b/src/tools/pgindent/exclude_file_patterns index b2e9d8f654..bfe103f195 100644 --- a/src/tools/pgindent/exclude_file_patterns +++ b/src/tools/pgindent/exclude_file_patterns @@ -10,6 +10,10 @@ src/include/jit/llvmjit\.h$ # This confuses pgindent, and it's a derived file anyway. src/backend/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$ +# # 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. kwlist_d\.h$ @@ -35,3 +39,5 @@ src/pl/plperl/Util\.c$ # Exclude any temporary installations that may be in the tree. /tmp_check/ /tmp_install/ +# ... and for paranoia's sake, don't touch git stuff. +/\.git/