From 499cb8c522ac95ce74d0dd7b992a188e353679d4 Mon Sep 17 00:00:00 2001 From: Ahmet Gedemenli Date: Wed, 4 Aug 2021 15:47:41 +0300 Subject: [PATCH] Add the new script to readme --- ci/README.md | 6 ++++++ ci/check_gucs_are_alphabetically_sorted.sh | 6 ++++++ 2 files changed, 12 insertions(+) mode change 100644 => 100755 ci/check_gucs_are_alphabetically_sorted.sh diff --git a/ci/README.md b/ci/README.md index 6e221b351..04375158c 100644 --- a/ci/README.md +++ b/ci/README.md @@ -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. diff --git a/ci/check_gucs_are_alphabetically_sorted.sh b/ci/check_gucs_are_alphabetically_sorted.sh old mode 100644 new mode 100755 index 56d8d879f..d5faeeb4a --- a/ci/check_gucs_are_alphabetically_sorted.sh +++ b/ci/check_gucs_are_alphabetically_sorted.sh @@ -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