-
Notifications
You must be signed in to change notification settings - Fork 44
Fix pgindent issues and run check in Github Actions workflow #305
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
base: main
Are you sure you want to change the base?
Conversation
The gen-typedefs.sh script accumulated duplicates on each run because it only appended to typedefs.list. Fixed by: - Uncommenting curl to fetch fresh PostgreSQL typedefs (overwrites file) - Adding sort/uniq to remove any internal duplicates - Cleaning up typedefs.list Sorting allow us to stabilise the content in case a struct or enum has been displaced. This ensures repeated script runs produce consistent, deduplicated output.
spockctrl is a standalone CLI utility that doesn't follow PostgreSQL coding conventions. Exclude it from typedef scanning and pgindent to avoid processing errors.
3cf50f5 to
c305334
Compare
Automatically validates code formatting on PRs to main branch using pgindent. Builds pg_bsd_indent from PostgreSQL source, runs gen-typedefs.sh, and fails if formatting issues are detected.
Better name reflects the script's actual purpose: running pgindent on all source files. Updated README and GitHub workflow accordingly.
c8cd510 to
b71d42d
Compare
The workflow now ignores typedefs.list changes. Note: Spock is used with different PostgreSQL versions, which can cause different pgindent results due to varying typedef lists from the buildfarm. This is inevitable - contributors should simply run run-pgindent.sh on their current master branch to ensure consistency.
| SPOCK_RESOLVE_FIRST_UPDATE_WINS | ||
| } SpockResolveOption; | ||
| } SpockResolveOption; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like typedefs.list is missing some names and that has disturbed the indentation.
rasifr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though it’s a standalone CLI utility, Its still part of Spock repo and I would prefer to keep processing it, so the formatting stays consistent across the codebase.
- Name anonymous enums (SpockResolveOption, GroupProgressTupDescColumns) - Change spock_conflict_resolver from int to SpockResolveOption type - Remove duplicate extern declarations in spock_conflict.h - Update pgindent typedefs list with new enum types
No description provided.