diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-21 19:28:30 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-21 19:22:41 +0200 |
commit | f503b724c1459e6b3097c792cc59546b206a8670 (patch) | |
tree | 97f58b01e322b0a8723ec874c60b5f428d4acc51 /community/luacheck | |
parent | 9273dbfb4970cbde02307b471fd0354391b4a4ab (diff) | |
download | aports-f503b724c1459e6b3097c792cc59546b206a8670.tar.bz2 aports-f503b724c1459e6b3097c792cc59546b206a8670.tar.xz |
community/luacheck: upgrade to 0.22.0
Diffstat (limited to 'community/luacheck')
-rw-r--r-- | community/luacheck/APKBUILD | 8 | ||||
-rw-r--r-- | community/luacheck/fix-caching-spec.patch | 40 |
2 files changed, 45 insertions, 3 deletions
diff --git a/community/luacheck/APKBUILD b/community/luacheck/APKBUILD index 34c33131a4..89d2a46874 100644 --- a/community/luacheck/APKBUILD +++ b/community/luacheck/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=luacheck -pkgver=0.21.2 +pkgver=0.22.0 pkgrel=0 pkgdesc="A tool for linting and static analysis of Lua code" url="https://github.com/mpeterv/luacheck" @@ -9,7 +9,8 @@ arch="noarch" license="MIT" depends="cmd:lua lua-filesystem" checkdepends="lua-busted" -source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/mpeterv/$pkgname/archive/$pkgver.tar.gz + fix-caching-spec.patch" builddir="$srcdir/$pkgname-$pkgver" check() { @@ -29,4 +30,5 @@ package() { install -D -m 755 bin/$pkgname.lua "$pkgdir"/usr/bin/$pkgname } -sha512sums="f2edcd9463b4af3ea1cbe3652c395196ff21dc371ddcbec6d19ff64017d0fc541f5cbd642661ec2064502e61680c556deb186259d27b2294743152fb4e69dbb3 luacheck-0.21.2.tar.gz" +sha512sums="8264000711214e8451307e7f51a45b06d2fcd5da0d3cb49952d54b07a9448431ae3fd68a8cd0a27c73c3b03e6de74e8ae786c139707e16cf938921ab582d3bfd luacheck-0.22.0.tar.gz +43eb51299382083ad97b136c9d8d45f0422ee90a48d5d256b3b41ae98a7e6b714589a637fcef6359d54ec581229eedba86c86107866fd9baeb9a60e91145da20 fix-caching-spec.patch" diff --git a/community/luacheck/fix-caching-spec.patch b/community/luacheck/fix-caching-spec.patch new file mode 100644 index 0000000000..45a54f0f52 --- /dev/null +++ b/community/luacheck/fix-caching-spec.patch @@ -0,0 +1,40 @@ +From 0c932626b0e6829a8380d39f1cc8f936159e5e5d Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Mon, 21 May 2018 19:14:12 +0200 +Subject: [PATCH] Fix cli caching spec to not fail when PWD contains hyphen + +When the current working directory (returned by `fs.get_current_dir()`) +contains a hyphen (e.g. /home/flynn/luacheck-0.22.0), the spec +"cli caching caches results" fails, because "-" is interpreted as +pattern item. + +This commit fixes this problem by escaping "-" together with "[" and +"]" inside the template after abspath{...} is substituted. + +Upstream-Issue: https://github.com/mpeterv/luacheck/pull/164 +--- + spec/cli_spec.lua | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spec/cli_spec.lua b/spec/cli_spec.lua +index 35365dc..4749b79 100644 +--- a/spec/cli_spec.lua ++++ b/spec/cli_spec.lua +@@ -913,7 +913,7 @@ Total: 16 warnings / 1 error in 4 files + end + + -- luacheck: push no max string line length +- local format_version, good_mtime, bad_mtime, python_mtime = cache:match(replace_abspath(([[ ++ local format_version, good_mtime, bad_mtime, python_mtime = cache:match(replace_abspath([[ + + (%d+) + abspath{spec/samples/good_code.lua} +@@ -925,7 +925,7 @@ local A,B,C,D,E,F="package","561","helper","function","embrace","hepler";return + abspath{spec/samples/python_code.lua} + (%d+) + return {{{"011",[3]=1,[4]=6,[5]=15,[13]="expected '=' near '__future__'"}},{},{},{}} +-]]):gsub("[%[%]]", "%%%0"))) ++]]):gsub("[%[%]%-]", "%%%0"), nil) + -- luacheck: pop + + format_version = tonumber(format_version) |