diff options
Diffstat (limited to 'dev-go/golangci-lint/golangci-lint-2.12.2.ebuild')
| -rw-r--r-- | dev-go/golangci-lint/golangci-lint-2.12.2.ebuild | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-go/golangci-lint/golangci-lint-2.12.2.ebuild b/dev-go/golangci-lint/golangci-lint-2.12.2.ebuild new file mode 100644 index 000000000000..59e31e0bce27 --- /dev/null +++ b/dev-go/golangci-lint/golangci-lint-2.12.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module shell-completion sysroot + +DESCRIPTION="Fast linters runner for Go" +HOMEPAGE="https://golangci-lint.run/ https://github.com/golangci/golangci-lint" +SRC_URI="https://github.com/golangci/golangci-lint/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz" + +LICENSE="GPL-3" +# Dependent licenses +LICENSE+=" Apache-2.0 BSD BSD-2 GPL-3 ISC MIT MPL-2.0 OFL-1.1" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=">=dev-lang/go-1.26.1" + +src_compile() { + emake build + + einfo "generating shell completion files" + sysroot_try_run_prefixed ./golangci-lint completion bash > ${PN}.bash || die + sysroot_try_run_prefixed ./golangci-lint completion zsh > ${PN}.zsh || die + sysroot_try_run_prefixed ./golangci-lint completion fish > ${PN}.fish || die +} + +src_test() { + emake test +} + +src_install() { + dobin golangci-lint + local DOCS=( README.md CHANGELOG.md ) + einstalldocs + + [[ -s ${PN}.bash ]] && newbashcomp ${PN}.bash ${PN} + [[ -s ${PN}.zsh ]] && newzshcomp ${PN}.zsh _${PN} + [[ -s ${PN}.fish ]] && dofishcomp ${PN}.fish +} |
