From e61ced53e3480bb3040b47a8ed6cbb3d0108ea43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanefi=20=C3=96nald=C4=B1?= Date: Mon, 22 Jun 2020 14:52:16 +0300 Subject: [PATCH 1/2] Disallow long changelog entries --- .circleci/config.yml | 3 +++ ci/disallow_long_changelog_entries.sh | 17 +++++++++++++++++ ci/fix_style.sh | 1 + 3 files changed, 21 insertions(+) create mode 100755 ci/disallow_long_changelog_entries.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index d487ae5ab..e11f4038c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,6 +47,9 @@ jobs: - run: name: 'Check if changed' command: git diff --exit-code + - run: + name: 'Check for lengths of changelog entries' + command: ci/disallow_long_changelog_entries.sh - run: name: 'Check for banned C API usage' command: ci/banned.h.sh diff --git a/ci/disallow_long_changelog_entries.sh b/ci/disallow_long_changelog_entries.sh new file mode 100755 index 000000000..36d7e5879 --- /dev/null +++ b/ci/disallow_long_changelog_entries.sh @@ -0,0 +1,17 @@ +#! /bin/bash + +set -eu + +# Having changelog items with entries that are longer than 80 characters are forbidden. +# Find all lines with disallowed length, and for all such lines store +# - line number +# - length of the line +# - the line content +too_long_lines=$(awk 'length() > 80 {print NR,"(",length(),"characters ) :",$0}' CHANGELOG.md) + +if [[ -n $too_long_lines ]] +then + echo "We allow at most 80 characters in CHANGELOG.md." + echo "${too_long_lines}" + exit 1 +fi diff --git a/ci/fix_style.sh b/ci/fix_style.sh index 39d2d312e..63d899f28 100755 --- a/ci/fix_style.sh +++ b/ci/fix_style.sh @@ -11,5 +11,6 @@ cd ${cidir}/.. ci/editorconfig.sh ci/remove_useless_declarations.sh ci/disallow_c_comments_in_migrations.sh +ci/disallow_long_changelog_entries.sh citus_indent . --quiet From e93c47f003192aadc875a501d43896fc9094af6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanefi=20=C3=96nald=C4=B1?= Date: Mon, 22 Jun 2020 15:07:56 +0300 Subject: [PATCH 2/2] Fix long changelog items --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d41a9a8..95fafc9bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1072,7 +1072,7 @@ * Adds user-facing UDFs for locking shard resources and metadata -* Refactors connection and transaction management; giving a consistent experience +* Refactors connection and transaction management; giving consistent experience * Enhances `COPY` with fully transactional semantics @@ -1088,7 +1088,7 @@ * Enhances `SERIAL` compatibility with MX tables -* Adds an `node_connection_timeout` parameter to control node connection timeouts +* Adds `node_connection_timeout` parameter to control node connection timeouts * Adds `enable_deadlock_prevention` setting to permit multi-node transactions