[pacman-dev,3/3] Fix linting of whitespace in pkgver

Message ID 20180220205213.13675-4-rikard.falkeborn@gmail.com
State Accepted, archived
Headers show
Series Make documentation and PKGBUILD linting more consistent | expand

Commit Message

Rikard Falkeborn Feb. 20, 2018, 8:52 p.m. UTC
In order to detect if pkgver contains whitespace, we need to quote it.
Previously, only the characters up to the first whitespace was checked.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Allan McRae March 14, 2018, 2:45 a.m. UTC | #1
On 21/02/18 06:52, Rikard Falkeborn wrote:
> In order to detect if pkgver contains whitespace, we need to quote it.
> Previously, only the characters up to the first whitespace was checked.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
>  scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
> index 0ec6584c..2325b1f5 100644
> --- a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
> +++ b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
> @@ -47,5 +47,5 @@ lint_pkgver() {
>  		return 0
>  	fi
>  
> -	check_pkgver $pkgver
> +	check_pkgver "$pkgver"
>  }
> 

Good catch.  Applied,
A

Patch

diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
index 0ec6584c..2325b1f5 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
@@ -47,5 +47,5 @@  lint_pkgver() {
 		return 0
 	fi
 
-	check_pkgver $pkgver
+	check_pkgver "$pkgver"
 }