Disallow long changelog entries

pull/3935/head
Hanefi Önaldı 2020-06-22 14:52:16 +03:00
parent f41e1b1a60
commit e61ced53e3
No known key found for this signature in database
GPG Key ID: 45A2ACB84E394FBA
3 changed files with 21 additions and 0 deletions

View File

@ -47,6 +47,9 @@ jobs:
- run: - run:
name: 'Check if changed' name: 'Check if changed'
command: git diff --exit-code command: git diff --exit-code
- run:
name: 'Check for lengths of changelog entries'
command: ci/disallow_long_changelog_entries.sh
- run: - run:
name: 'Check for banned C API usage' name: 'Check for banned C API usage'
command: ci/banned.h.sh command: ci/banned.h.sh

View File

@ -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

View File

@ -11,5 +11,6 @@ cd ${cidir}/..
ci/editorconfig.sh ci/editorconfig.sh
ci/remove_useless_declarations.sh ci/remove_useless_declarations.sh
ci/disallow_c_comments_in_migrations.sh ci/disallow_c_comments_in_migrations.sh
ci/disallow_long_changelog_entries.sh
citus_indent . --quiet citus_indent . --quiet