From: Mark Andrews Date: Wed, 27 Jan 2021 02:00:38 +0000 (+1100) Subject: Detect overly long CHANGES lines X-Git-Tag: v9.17.10~16^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1ecab63835f15f456db35036305f9ec55ba1602;p=thirdparty%2Fbind9.git Detect overly long CHANGES lines --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dfccdbf50c..6412ea52ae8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -455,9 +455,11 @@ misc: - sh util/tabify-changes < CHANGES > CHANGES.tmp - diff -urNap CHANGES CHANGES.tmp - perl util/check-changes CHANGES + - sh util/check-line-length.sh CHANGES - test ! -f CHANGES.SE || sh util/tabify-changes < CHANGES.SE > CHANGES.tmp - test ! -f CHANGES.SE || diff -urNap CHANGES.SE CHANGES.tmp - test ! -f CHANGES.SE || perl util/check-changes master=0 CHANGES.SE + - test ! -f CHANGES.SE || sh util/check-line-length.sh CHANGES.SE - rm CHANGES.tmp - perl -w util/merge_copyrights - diff -urNap util/copyrights util/newcopyrights diff --git a/util/check-line-length.sh b/util/check-line-length.sh new file mode 100644 index 00000000000..3114dba8ddd --- /dev/null +++ b/util/check-line-length.sh @@ -0,0 +1,22 @@ +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, you can obtain one at https://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +expand "$1" | +awk -v file="$1" 'length > 80 { + if (logged == 0) { + print file ": Line Too Long" + logged = 1 + } + print +} +END { + if (logged == 1) { + exit(1) + } +}' diff --git a/util/copyrights b/util/copyrights index f69380df2ca..7270dccc780 100644 --- a/util/copyrights +++ b/util/copyrights @@ -2189,6 +2189,7 @@ ./util/check-cocci X 2018,2019,2020,2021 ./util/check-includes.pl PERL 2000,2001,2004,2007,2012,2016,2017,2018,2019,2020,2021 ./util/check-instincludes.sh SH 2000,2001,2004,2007,2012,2016,2018,2019,2020,2021 +./util/check-line-length.sh SH 2021 ./util/check-make-install.in SH 2020 ./util/check-pullups.pl PERL 2001,2002,2003,2004,2007,2012,2016,2018,2019,2020,2021 ./util/check-sources.pl PERL 2000,2001,2004,2007,2012,2013,2016,2018,2019,2020,2021