# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/dominikh/go-tools 2026.1
go.package          honnef.co/go/tools
name                staticcheck
revision            0

homepage            https://staticcheck.io

description         Staticcheck - The advanced Go linter

long_description    \
    Staticcheck is a state of the art linter for the Go programming language. \
    Using static analysis, it finds bugs and performance issues, offers \
    simplifications, and enforces style rules.  Each of the 100+ checks has \
    been designed to be fast, precise and useful. When Staticcheck flags \
    code, you can be sure that it isn't wasting your time with unactionable \
    warnings. While checks have been designed to be useful out of the box, \
    they still provide configuration where necessary, to fine-tune to your \
    needs, without overwhelming you with hundreds of options.  Included with \
    Staticcheck is a collection of tools for working with Go code, including \
    linters and static analysis.

categories          devel
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  56d388c11e8783a8970e7268d4f28f6ffa1a6eac \
                    sha256  4b20d65194e5462264c784f2968de65fcd7aba8e9efa37aa9b1fadc13b29699b \
                    size    766948

go.offline_build no
build.env-append    CGO_ENABLED=0

set _build_path     ${worksrcpath}/build

build.pre_args      -trimpath -o ${_build_path}
build.args          ./cmd/...

pre-build {
    file mkdir ${_build_path}
}

destroot {
    xinstall -m 0755 {*}[glob ${_build_path}/*] ${destroot}${prefix}/bin/
}

github.livecheck.regex {([0-9.]+)}
