mirror of https://github.com/postgres/postgres
PG-1095 Add format validation CI workflow and format sources (#308)
* PG-1095 Add code format validation to CI * PG-1095 Manually fix some codestyle * PG-1095 Add comment to pgindent_exclude file * PG-1095 Format sources * PG-1095 Fix makefile * PG-1095 Remove accidentally commited file * PG-1094 Update gitignore * PG-1094 Update pgindent_exclude * PG-1095 Update typedefs list * PG-1095 Manual code formatting * PG-1095 Update typedefs list * PG-1095 More manual code formatting * PG-1095 More manual code formatting * PG-1095 More fixes * PG-1095 Fixpull/209/head
parent
2f31c0ed45
commit
d2237acde5
@ -0,0 +1,57 @@ |
||||
name: Checks |
||||
on: |
||||
pull_request: |
||||
|
||||
jobs: |
||||
format: |
||||
name: Format |
||||
runs-on: ubuntu-22.04 |
||||
timeout-minutes: 5 |
||||
|
||||
steps: |
||||
- name: Install dependencies |
||||
run: | |
||||
sudo apt-get update |
||||
sudo apt-get install -y libcurl4-openssl-dev |
||||
|
||||
- name: Clone postgres repository |
||||
uses: actions/checkout@v4 |
||||
with: |
||||
repository: 'postgres/postgres' |
||||
ref: 'REL_17_STABLE' |
||||
|
||||
- name: Checkout sources |
||||
uses: actions/checkout@v4 |
||||
with: |
||||
path: 'contrib/pg_tde' |
||||
|
||||
- name: Configure postgres |
||||
run: ./configure |
||||
|
||||
- name: Configure pg_tde |
||||
run: ./configure |
||||
working-directory: contrib/pg_tde |
||||
|
||||
- name: Install perltidy |
||||
run: sudo cpan -T SHANCOCK/Perl-Tidy-20230309.tar.gz |
||||
|
||||
- name: Install pg_bsd_indent |
||||
working-directory: src/tools/pg_bsd_indent |
||||
run: sudo make install |
||||
|
||||
- name: Add pg_bsd_indent and pgindent to path |
||||
run: | |
||||
echo "/usr/local/pgsql/bin" >> $GITHUB_PATH |
||||
echo "${{ github.workspace }}/src/tools/pgindent" >> $GITHUB_PATH |
||||
|
||||
- name: Format sources |
||||
working-directory: contrib/pg_tde |
||||
run: | |
||||
make update-typedefs |
||||
make indent |
||||
|
||||
- name: Check files are formatted and no source code changes |
||||
working-directory: contrib/pg_tde |
||||
run: | |
||||
git status |
||||
git diff --exit-code |
@ -0,0 +1,9 @@ |
||||
|
||||
# List of filename patterns to exclude from pgindent runs |
||||
# |
||||
# This contains code copied from postgres tree as is and slightly modified. |
||||
# We don't want to run pgindent on these files to avoid unnecessary conflicts. |
||||
src\d\d/ |
||||
|
||||
# This file is generated by configure and should not be formatted |
||||
src/include/config.h |
@ -0,0 +1,113 @@ |
||||
BulkInsertStateData |
||||
BulkInsertStateData |
||||
BulkInsertStateData |
||||
BulkInsertStateData |
||||
CurlString |
||||
FileKeyring |
||||
GenericKeyring |
||||
HeapPageFreeze |
||||
HeapPageFreeze |
||||
HeapScanDescData |
||||
HeapScanDescData |
||||
HeapScanDescData |
||||
HeapScanDescData |
||||
HeapTupleFreeze |
||||
HeapTupleFreeze |
||||
IndexDeleteCounts |
||||
IndexDeleteCounts |
||||
IndexFetchHeapData |
||||
IndexFetchHeapData |
||||
InternalKey |
||||
JsonKeringSemState |
||||
JsonKeyringField |
||||
JsonKeyringState |
||||
JsonVaultRespField |
||||
JsonVaultRespSemState |
||||
JsonVaultRespState |
||||
KeyProviders |
||||
KeyringProvideRecord |
||||
KeyringProviderXLRecord |
||||
KeyringReturnCode |
||||
LVPagePruneState |
||||
LVRelState |
||||
LVRelState |
||||
LVSavedErrInfo |
||||
LVSavedErrInfo |
||||
LogicalRewriteMappingData |
||||
LogicalRewriteMappingData |
||||
PendingMapEntryDelete |
||||
ProviderScanType |
||||
PruneFreezeResult |
||||
RelKeyCache |
||||
RelKeyCacheRec |
||||
RelKeyData |
||||
RewriteMappingDataEntry |
||||
RewriteMappingDataEntry |
||||
RewriteMappingFile |
||||
RewriteMappingFile |
||||
RewriteStateData |
||||
RewriteStateData |
||||
RewriteStateData |
||||
RewriteStateData *RewriteState; |
||||
TDEBufferHeapTupleTableSlot |
||||
TDEFileHeader |
||||
TDEKeyringRoutine |
||||
TDELocalState |
||||
TDELockTypes |
||||
TDEMapEntry |
||||
TDEMapFilePath |
||||
TDEPrincipalKey |
||||
TDEPrincipalKeyId |
||||
TDEPrincipalKeyInfo |
||||
TDEShmemSetupRoutine |
||||
TdeCreateEvent |
||||
TdeCreateEventType |
||||
TdeKeyProviderInfoSharedState |
||||
TdePrincipalKeySharedState |
||||
TdePrincipalKeylocalState |
||||
TdeSharedState |
||||
VaultV2Keyring |
||||
XLogExtensionInstall |
||||
XLogPrincipalKeyRotate |
||||
XLogRelKey |
||||
itemIdCompactData |
||||
itemIdCompactData |
||||
keyData |
||||
keyInfo |
||||
keyName |
||||
xl_multi_insert_tuple |
||||
xl_multi_insert_tuple |
||||
xl_tdeheap_confirm |
||||
xl_tdeheap_confirm |
||||
xl_tdeheap_delete |
||||
xl_tdeheap_delete |
||||
xl_tdeheap_freeze_page |
||||
xl_tdeheap_freeze_plan |
||||
xl_tdeheap_header |
||||
xl_tdeheap_header |
||||
xl_tdeheap_inplace |
||||
xl_tdeheap_inplace |
||||
xl_tdeheap_insert |
||||
xl_tdeheap_insert |
||||
xl_tdeheap_lock |
||||
xl_tdeheap_lock |
||||
xl_tdeheap_lock_updated |
||||
xl_tdeheap_lock_updated |
||||
xl_tdeheap_multi_insert |
||||
xl_tdeheap_multi_insert |
||||
xl_tdeheap_new_cid |
||||
xl_tdeheap_new_cid |
||||
xl_tdeheap_prune |
||||
xl_tdeheap_prune |
||||
xl_tdeheap_rewrite_mapping |
||||
xl_tdeheap_rewrite_mapping |
||||
xl_tdeheap_truncate |
||||
xl_tdeheap_truncate |
||||
xl_tdeheap_update |
||||
xl_tdeheap_update |
||||
xl_tdeheap_vacuum |
||||
xl_tdeheap_visible |
||||
xl_tdeheap_visible |
||||
xlhp_freeze_plan |
||||
xlhp_freeze_plans |
||||
xlhp_prune_items |
Loading…
Reference in new issue