Skip to content

Commit acc92b1

Browse files
committed
Rename gen-typedefs.sh to run-pgindent.sh
Better name reflects the script's actual purpose: running pgindent on all source files. Updated README and GitHub workflow accordingly.
1 parent 4c32dc0 commit acc92b1

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.github/workflows/pgindent-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
echo "/tmp/postgresql/src/tools/pgindent" >> $GITHUB_PATH
3939
echo "/tmp/postgresql/src/tools/pg_bsd_indent" >> $GITHUB_PATH
4040
41-
- name: Run gen-typedefs.sh and check formatting
41+
- name: Run pgindent and check formatting
4242
working-directory: utils/pgindent
4343
run: |
44-
chmod +x gen-typedefs.sh
45-
./gen-typedefs.sh
44+
chmod +x run-pgindent.sh
45+
./run-pgindent.sh
4646
4747
- name: Check for formatting changes
4848
run: |

utils/pgindent/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
## Running pgindent on spock files
22

3-
1. Generate typedefs.list by running `./gen-typedefs.sh`. This will pull the latest postgres typedefs from postgres buildfarm and add Spock-related typedefs to it by scanning the source code.
4-
2. Install pg_bsd_indent: navigate to src/tools/pg_bsd_indent in your postgres source code and run:
5-
```
6-
make install prefix=/usr/local
7-
```
8-
3. Assuming you have pgindent in your path, run this from spock base directory:
9-
```
10-
pgindent --typedefs=pgindent/typedefs.list <filename>
11-
```
3+
1. Run `./run-pgindent.sh` to format all code. This script will:
4+
- Pull the latest PostgreSQL typedefs from buildfarm
5+
- Extract Spock-specific typedefs by scanning the source code
6+
- Run pgindent on all .c and .h files (excluding spockctrl)
127

8+
2. Prerequisites:
9+
- Install pg_bsd_indent: navigate to src/tools/pg_bsd_indent in your postgres source code and run:
10+
```
11+
make install prefix=/usr/local
12+
```
13+
- Ensure pgindent is in your PATH (from PostgreSQL source: src/tools/pgindent/pgindent)
14+
15+
3. File typedefs.list stays in repository to log changes in the struct set of the core and the Spock.

0 commit comments

Comments
 (0)