summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Zimmermann <johnz@posteo.net>2018-06-19 12:12:18 +0000
committerLeah Neukirchen <leah@vuxu.org>2018-06-19 15:26:54 +0200
commitb894203fb2840dffbaaccee3a352cc55653cb472 (patch)
treeb1cfb8f5c55f281737ea847b01d26855736405a6
parent423c7c6ca85dd8e4e25d8c60afff2588f474aa26 (diff)
downloadxtools-b894203fb2840dffbaaccee3a352cc55653cb472.tar.gz
xtools-b894203fb2840dffbaaccee3a352cc55653cb472.tar.xz
xtools-b894203fb2840dffbaaccee3a352cc55653cb472.zip
xlint: check if version in distfiles is a non variable
Closes: #93 [via git-merge-pr]
-rwxr-xr-xxlint2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlint b/xlint
index aa49c87..e4fd227 100755
--- a/xlint
+++ b/xlint
@@ -187,6 +187,8 @@ for template; do
 	scan '^\t*[^ ]*  *\(\)' 'do not use space before function parenthesis'
 	scan '^\t*[^ ]*\(\)(|   *){' 'use one space after function parenthesis'
 	scan '^\t*[^ ]*\(\)$' 'do not use a newline before function opening brace'
+	version=$(grep -Po "^version=\K.*" "$template")
+	scan "distfiles=.*\Q$version\E" 'use ${version} in distfiles instead'
 	else
 	echo no such template "$template" 1>&2
 	fi | sort -t: -n -k2 | grep . && ret=1