diff --git a/.circleci/config.yml b/.circleci/config.yml index a05c9852a..a3605457f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,10 +84,7 @@ jobs: command: ci/check_all_ci_scripts_are_run.sh - run: name: 'Check if all GUCs are sorted alphabetically' - command: | - set -euo pipefail - grep -o -E "(\.*\"citus.\w+\")," src/backend/distributed/shared_library_init.c > gucs.out - sort -c gucs.out + command: ci/check_gucs_are_alphabetically_sorted.sh check-sql-snapshots: docker: diff --git a/ci/check_gucs_are_alphabetically_sorted.sh b/ci/check_gucs_are_alphabetically_sorted.sh new file mode 100644 index 000000000..56d8d879f --- /dev/null +++ b/ci/check_gucs_are_alphabetically_sorted.sh @@ -0,0 +1,3 @@ +set -euo pipefail +grep -o -E "(\.*\"citus.\w+\")," src/backend/distributed/shared_library_init.c > gucs.out +sort -c gucs.out diff --git a/ci/check_gucs_order.py b/ci/check_gucs_order.py deleted file mode 100644 index e15de71cf..000000000 --- a/ci/check_gucs_order.py +++ /dev/null @@ -1,16 +0,0 @@ -import os - -fileDir = os.path.dirname(os.path.realpath('__file__')) -filename = os.path.join(fileDir, 'src/backend/distributed/shared_library_init.c') -shared_library_init = open(filename, 'r') -lines = shared_library_init.readlines() -getnextline = False -previous_guc = '' -for line in lines: - if getnextline: - if line < previous_guc: - exit(1) - previous_guc = line - getnextline = False - if 'DefineCustom' in line: - getnextline = True