From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C280C1581EE for ; Fri, 28 Mar 2025 16:35:03 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id AE720342FEF for ; Fri, 28 Mar 2025 16:35:03 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id B87691104B1; Fri, 28 Mar 2025 16:35:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id AB48F1104B1 for ; Fri, 28 Mar 2025 16:35:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 65F16342FEF for ; Fri, 28 Mar 2025 16:35:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F181F1733 for ; Fri, 28 Mar 2025 16:35:00 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1743179687.b84ebe20b2c1f0f8d2b3b28c13a67aa1c23e409a.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-go/golangci-lint/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-go/golangci-lint/golangci-lint-2.0.2.ebuild X-VCS-Directories: dev-go/golangci-lint/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: b84ebe20b2c1f0f8d2b3b28c13a67aa1c23e409a X-VCS-Branch: master Date: Fri, 28 Mar 2025 16:35:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c00fa068-fe5a-4948-bcdd-e650cadd3517 X-Archives-Hash: cab1fc4aba7a061da4c6d9c8343752cd commit: b84ebe20b2c1f0f8d2b3b28c13a67aa1c23e409a Author: Arthur Zamarin gentoo org> AuthorDate: Fri Mar 28 10:50:07 2025 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Mar 28 16:34:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b84ebe20 dev-go/golangci-lint: add shell completion files Signed-off-by: Arthur Zamarin gentoo.org> dev-go/golangci-lint/golangci-lint-2.0.2.ebuild | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dev-go/golangci-lint/golangci-lint-2.0.2.ebuild b/dev-go/golangci-lint/golangci-lint-2.0.2.ebuild index 1e7c1c241e68..7fd588351a36 100644 --- a/dev-go/golangci-lint/golangci-lint-2.0.2.ebuild +++ b/dev-go/golangci-lint/golangci-lint-2.0.2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit go-module +inherit go-module shell-completion toolchain-funcs DESCRIPTION="Fast linters runner for Go" HOMEPAGE="https://golangci-lint.run/ https://github.com/golangci/golangci-lint" @@ -18,6 +18,13 @@ KEYWORDS="~amd64" src_compile() { emake build + + if ! tc-is-cross-compiler; then + einfo "generating shell completion files" + ./golangci-lint completion bash > ${PN}.bash || die + ./golangci-lint completion zsh > ${PN}.zsh || die + ./golangci-lint completion fish > ${PN}.fish || die + fi } src_test() { @@ -28,4 +35,12 @@ src_install() { dobin golangci-lint local DOCS=( README.md CHANGELOG.md ) einstalldocs + + if ! tc-is-cross-compiler; then + newbashcomp ${PN}.bash ${PN} + newzshcomp ${PN}.zsh _${PN} + dofishcomp ${PN}.fish + else + ewarn "Shell completion files not installed! Install them manually with '${PN} completion --help'" + fi }