Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4133ec

Browse files
committed
Exclude fmgrprotos.h from pgindent processing.
pgindent messes up entries in this file if their names matchtypedef names. While there's reason to avoid choosing conflictingnames, we have some historical exceptions, and there's no guaranteethat more duplicates won't appear in future. Since this is a derivedfile anyway, there's little harm in just excluding it.I said yesterday that all our derived files are pgindent-clean, or elseexplicitly excluded from indentation, but I'd forgotten about this one.Now that project is really done, as confirmed by a test run.Discussion:https://postgr.es/m/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com
1 parentce90f07 commitc4133ec

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎src/tools/pgindent/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ the comment block with some dashes:
101101

102102
Odd spacing around typedef names might indicate an incomplete typedefs list.
103103

104+
pgindent will mangle both declaration and definition of a C function whose
105+
name matches a typedef. Currently the best workaround is to choose
106+
non-conflicting names.
107+
104108
pgindent can get confused by #if sequences that look correct to the compiler
105109
but have mismatched braces/parentheses when considered as a whole. Usually
106110
that looks pretty unreadable to humans too, so best practice is to rearrange

‎src/tools/pgindent/exclude_file_patterns

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ src/include/jit/llvmjit\.h$
1010
# This confuses pgindent, and it's a derived file anyway.
1111
src/backend/utils/fmgrtab\.c$
1212
#
13+
# pgindent might mangle entries in this that match typedef names.
14+
# Since it's a derived file anyway, just exclude it.
15+
src/backend/utils/fmgrprotos\.h$
16+
#
1317
# kwlist_d files are made by gen_keywordlist.pl. While we could insist that
1418
# they match pgindent style, they'd look worse not better, so exclude them.
1519
kwlist_d\.h$
@@ -35,3 +39,5 @@ src/pl/plperl/Util\.c$
3539
# Exclude any temporary installations that may be in the tree.
3640
/tmp_check/
3741
/tmp_install/
42+
# ... and for paranoia's sake, don't touch git stuff.
43+
/\.git/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp