Add the new script to readme

add-check-for-gucs-order-1
Ahmet Gedemenli 2021-08-04 15:47:41 +03:00
parent ca9b699525
commit 499cb8c522
2 changed files with 12 additions and 0 deletions

View File

@ -358,3 +358,9 @@ This script checks and fixes issues with `.gitignore` rules:
2. Makes sure we do not commit any generated files that should be ignored. If there is an
ignored file in the git tree, the user is expected to review the files that are removed
from the git tree and commit them.
## `check_gucs_are_alphabetically_sorted.sh`
This script checks the order of the GUCs defined in `shared_library_init.c`.
To solve this failure, please check `shared_library_init.c` and make sure that the GUC
definitions are in alphabetical order.

6
ci/check_gucs_are_alphabetically_sorted.sh Normal file → Executable file
View File

@ -1,3 +1,9 @@
#!/bin/bash
set -euo pipefail
# shellcheck disable=SC1091
source ci/ci_helpers.sh
# extract citus gucs in the form of "citus.X"
grep -o -E "(\.*\"citus.\w+\")," src/backend/distributed/shared_library_init.c > gucs.out
sort -c gucs.out