Exclude generated wait_event files from pgindent

Started by Bharath Rupireddyabout 2 years ago2 messages
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
1 attachment(s)

Hi,

I think we need to add pgstat_wait_event.c, wait_event_types.h and
wait_event_funcs_data.c to pgindent/exclude_file_patterns, otherwise,
pgindent on the entire source tree after the source code compilation
shows up these generated files. I've attached a patch to fix it.

Thoughts?

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachments:

v1-0001-Exclude-generated-wait_event-files-from-pgindent.patchapplication/x-patch; name=v1-0001-Exclude-generated-wait_event-files-from-pgindent.patchDownload
From b15de73799692fb617e17a2ce5956b5ebca86cb3 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Thu, 28 Dec 2023 11:34:55 +0000
Subject: [PATCH v1] Exclude generated wait_event files from pgindent

---
 src/tools/pgindent/exclude_file_patterns | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/tools/pgindent/exclude_file_patterns b/src/tools/pgindent/exclude_file_patterns
index 6405a00511..a311507249 100644
--- a/src/tools/pgindent/exclude_file_patterns
+++ b/src/tools/pgindent/exclude_file_patterns
@@ -46,6 +46,10 @@ src/include/pg_config\.h$
 src/pl/plperl/ppport\.h$
 src/pl/plperl/SPI\.c$
 src/pl/plperl/Util\.c$
+src/backend/nodes/nodetags\.h$
+src/backend/utils/activity/pgstat_wait_event\.c$
+src/backend/utils/activity/wait_event_types\.h$
+src/backend/utils/activity/wait_event_funcs_data\.c$
 #
 # pg_bsd_indent has its own, idiosyncratic indentation style.
 # We'll stick to that to permit comparison with the FreeBSD upstream.
-- 
2.34.1

#2Michael Paquier
michael@paquier.xyz
In reply to: Bharath Rupireddy (#1)
Re: Exclude generated wait_event files from pgindent

On Sun, Dec 31, 2023 at 07:24:02AM +0530, Bharath Rupireddy wrote:

I think we need to add pgstat_wait_event.c, wait_event_types.h and
wait_event_funcs_data.c to pgindent/exclude_file_patterns, otherwise,
pgindent on the entire source tree after the source code compilation
shows up these generated files. I've attached a patch to fix it.

Thoughts?

Indeed, will fix.
--
Michael