Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "pgindent" rule for make to run pgindent #71

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ include Makefile.common.mk

RELEASE_SQL = $(EXTENSION)--$(PGSPHERE_VERSION).sql
USE_PGXS = 1
USE_HEALPIX =? 1
USE_HEALPIX ?= 1
PGINDENT ?= pgindent
PGBSDINDENT ?= pg_bsd_indent

# the base dir name may be changed depending on git clone command
SRC_DIR = $(shell basename $(shell pwd))
Expand Down Expand Up @@ -223,3 +225,27 @@ endif
dist : clean sparse.c sscan.c
find . -name '*~' -type f -exec rm {} \;
cd .. && tar --transform s/$(SRC_DIR)/pgsphere-$(PGSPHERE_VERSION)/ --exclude CVS --exclude .git -czf pgsphere-$(PGSPHERE_VERSION).tar.gz $(SRC_DIR) && cd -

# To use pgindent, set the PATH environment variable to include the directories
# containing the binaries pgindent and pg_bsd_indent. It is important to
# utilize a specific version of pg_bsd_indent, which sources can be found
# in the <postgresql>/src/tools/pg_bsd_indent directory, where <postgresql>
# is the root directory of the PostgreSQL project source tree.
#
# The sources of the utilities can be found in the following directories:
# - <postgresql>/src/tools/pgindent
# - <postgresql>/src/tools/pg_bsd_indent
#
# pgindent-typedefs.list should be updated every time after implementing
# new types and introducing new typedefs in the code. For details how
# to update pgindent-typedefs.list and for other information about pgindent,
# please, read the doc: <postgresql>/src/tools/pgindent/README.
#
# pgindent-excludes.list is used to specify files to be ignored.
#
pgindent:
$(PGINDENT) \
--typedefs=pgindent-typedefs.list \
--excludes=pgindent-excludes.list \
--indent=${PGBSDINDENT} \
src
1 change: 1 addition & 0 deletions pgindent-excludes.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pgs_process_moc.h
236 changes: 236 additions & 0 deletions pgindent-typedefs.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
align_val_t
allocator_type
__alloc_rebind
ArrayType
AttrDefault
AttrNumber
_Base_ptr
BlockNumber
Box3D
BpChar
bpoint
BrinDesc
BrinOpcInfo
brin_serialize_callback_type
BrinValues
__builtin_va_list
_Char_alloc_type
char_type
CommonEntry
__compar_fn_t
ConsiderSplitContext
_Const_Base_ptr
__const_iterator
const_iterator
_Const_Link_type
const_pointer
ConstrCheck
const_reference
const_reverse_iterator
const_void_pointer
coord_t
CPoint
Datum
difference_type
_DistanceType
div_t
DomainConstraintCache
double_t
__dso_handle
__enable_if_t
false>
false_type
__FILE
FILE
first_type
flex_int16_t
flex_uint8_t
float4
float8
float_t
FmgrInfo
fmNodePtr
FormData_pg_attribute
__fpos_t
fpos_t
FunctionCallInfo
GISTENTRY
GistEntryVector
GISTPageOpaque
GISTPageOpaqueData
GIST_SPLITVEC
GiSTSPointKey
__gnuc_va_list
Healpix_Base2
hpint64
insert_return_type
int16
__int16_t
int16_t
int32
__int32_t
int32_t
int64
__int64_t
int64_t
int8
__int8_t
int8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_fast8_t
__int_least16_t
int_least16_t
__int_least32_t
int_least32_t
__int_least64_t
int_least64_t
__int_least8_t
int_least8_t
__intmax_t
intmax_t
intptr_t
int_type
_IO_lock_t
iostate
ItemIdData
iterator
iterator_category
iterator_type
key_compare
key_type
layout_vec
ldiv_t
_Link_type
lldiv_t
LocationIndex
__make_not_void
map_const_iter
map_iterator
mapped_type
map_rev_iter
max_align_t
__mbstate_t
mbstate_t
MemoryContext
moc_interval
moc_map
moc_map_entry
moc_out_data
moc_tree_entry
NameData
_Node_allocator
NodeTag
node_type
NullableDatum
nullptr_t
__off64_t
OffsetNumber
__off_t
Oid
ostream
__ostream_type
other
output_map
Page
PageGistNSN
PageHeader
PageHeaderData
PageXLogRecPtr
Pg_finfo_record
PGFunction
Pg_magic_struct
pgs_error_handler
phasevec
Point
Point3D
__pointer
pointer
Pointer
ptrdiff_t
__ptr_rebind
rebind
rebind_alloc
reference
Relation
_Rep_type
reverse_iterator
rintv_iter
rnode_iter
rtype
SBOX
SCIRCLE
second_type
_Self
SELLIPSE
SEuler
Size
size_t
size_type
SLine
Smoc
SPATH
SplitInterval
SPoint
SPOLY
StrategyNumber
streamsize
string
__sv_type
t_ang
tdiff
text
_Tp_alloc_type
TransactionId
true_type
tsize
TupleConstr
TupleDesc
__type
type
TypeCacheEntry
uchar
uint16
__uint16_t
uint16_t
uint32
__uint32_t
uint32_t
uint64
__uint64_t
uint64_t
uint8
__uint8_t
uint8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_fast8_t
__uint_least16_t
uint_least16_t
__uint_least32_t
uint_least32_t
__uint_least64_t
uint_least64_t
__uint_least8_t
uint_least8_t
__uintmax_t
uintmax_t
uintptr_t
va_list
value_type
varattrib_4b
vec3
Vector3D
wctrans_t
wctype_t
wint_t
YY_BUFFER_STATE
YY_CHAR
yy_size_t
yy_state_type
YYSTYPE
yytype_int16
yytype_int8
yytype_uint8