From f9d285f26309ac77d9786df7b8e874cf6eeabc43 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Sun, 20 Mar 2022 00:46:12 +0000
Subject: [PATCH] community/staticcheck: upgrade to 2021.1.2_git20220306

this momentarily fixes building with go 1.18, for which there should
also be a proper release next week[0]

[0]: https://github.com/dominikh/go-tools/issues/1200#issuecomment-1069113830
---
 community/staticcheck/APKBUILD               | 14 +++++++++-----
 community/staticcheck/fix-failing-test.patch | 11 +++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 community/staticcheck/fix-failing-test.patch

diff --git a/community/staticcheck/APKBUILD b/community/staticcheck/APKBUILD
index e45782c71777..d2cbef276e78 100644
--- a/community/staticcheck/APKBUILD
+++ b/community/staticcheck/APKBUILD
@@ -1,16 +1,19 @@
 # Contributor: Clayton Craft <clayton@craftyguy.net>
 # Maintainer: Clayton Craft <clayton@craftyguy.net>
 pkgname=staticcheck
-pkgver=2021.1.2
-pkgrel=3
+pkgver=2021.1.2_git20220306
+_gitrev=23e1086441d24fed9f668ad1cd4374245118b590
+pkgrel=0
 pkgdesc="advanced Go linter"
 url="https://github.com/dominikh/go-tools"
 arch="all"
 license="MIT"
 makedepends="go"
 options="net"
-source="$pkgname-$pkgver.tar.gz::https://github.com/dominikh/go-tools/archive/$pkgver.tar.gz"
-builddir="$srcdir/go-tools-$pkgver"
+source="$pkgname-$pkgver.tar.gz::https://github.com/dominikh/go-tools/archive/$_gitrev.tar.gz
+	fix-failing-test.patch
+	"
+builddir="$srcdir/go-tools-$_gitrev"
 
 case "$CARCH" in
 	# tests run out of memory in CI on these platforms:
@@ -40,5 +43,6 @@ package() {
 }
 
 sha512sums="
-f77fc8e50ebbd5c0ccbd761df46076917f8d11722a3422e7e0f839282900b4537d4e8219f39a18f0c4f979a2726c16c8c7081eaff9f6bafb77484d38bbf7cee0  staticcheck-2021.1.2.tar.gz
+888ce478ba36119385f0898bcf9acbe8a2415b6b27088f513bca2a6f393192405121971dc0d9d4d42e3176befc74171f02d66a5145de590a77bf2e4d637d2996  staticcheck-2021.1.2_git20220306.tar.gz
+4da56ebe1a9decbab2a6c791a14a4768fe13f42ff5b2b9d211d3812d72aa8bb229ea9bb227cfe0e0a7379179faafe6c44ed9bdbb9c6388aa7e441cf6e98fcc6c  fix-failing-test.patch
 "
diff --git a/community/staticcheck/fix-failing-test.patch b/community/staticcheck/fix-failing-test.patch
new file mode 100644
index 000000000000..aa13a22c564f
--- /dev/null
+++ b/community/staticcheck/fix-failing-test.patch
@@ -0,0 +1,11 @@
+--- a/lintcmd/lint_test.go
++++ b/lintcmd/lint_test.go
+@@ -69,7 +69,7 @@
+ 					Line:     6,
+ 					Column:   6,
+ 				},
+-				Message:  "invalid operation: mismatched types int and string",
++				Message:  "invalid operation: x + y (mismatched types int and string)",
+ 				Category: "compile",
+ 			},
+ 			Severity: 0,
-- 
GitLab