diff --git a/Makefile b/Makefile index ce711408c5942ea9f73de996d56126d147297e98..95a069016bb702bd4e02159cd3a970e3cb60cde3 100644 --- a/Makefile +++ b/Makefile @@ -47,12 +47,16 @@ race: fmt: $Q goimports -local github.com/golangci/golangci-lint -l -w $(SRC) -lint: SHELL:=/bin/bash -lint: +lint: golint govulncheck + +golint: SHELL:=/bin/bash +golint: $Q LOG_LEVEL=error golangci-lint run --config <(curl -s https://raw.githubusercontent.com/smallstep/workflows/master/.golangci.yml) --timeout=30m + +govulncheck: $Q govulncheck ./... -.PHONY: fmt lint +.PHONY: fmt lint golint govulncheck ######################################### # Clean diff --git a/truststore_darwin.go b/truststore_darwin.go index 9f25654585d37e0f9434a9fc3f1fe666cf1d74bb..ebc7a582c3ed7bb5c798d79942c0629f521c6d63 100644 --- a/truststore_darwin.go +++ b/truststore_darwin.go @@ -122,7 +122,7 @@ func installPlatform(filename string, cert *x509.Certificate) error { return nil } -func uninstallPlatform(filename string, cert *x509.Certificate) error { +func uninstallPlatform(filename string, _ *x509.Certificate) error { cmd := exec.Command("sudo", "security", "remove-trusted-cert", "-d", filename) out, err := cmd.CombinedOutput() if err != nil { diff --git a/truststore_java.go b/truststore_java.go index 7051a43d7803bdfcb2353626534a36d68d42dc8f..406ad475abd709a6a91ff16a895cd37fb1ba314e 100644 --- a/truststore_java.go +++ b/truststore_java.go @@ -87,7 +87,7 @@ func (t *JavaTrust) Install(filename string, cert *x509.Certificate) error { } // Uninstall implements the Trust interface. -func (t *JavaTrust) Uninstall(filename string, cert *x509.Certificate) error { +func (t *JavaTrust) Uninstall(_ string, cert *x509.Certificate) error { args := []string{ "-delete", "-alias", uniqueName(cert), diff --git a/truststore_linux.go b/truststore_linux.go index 03bb2698dfda72cc8d7458660ca8cc07fe021a77..8be200cee29de8a6345507e4e49811a7bd2af84a 100644 --- a/truststore_linux.go +++ b/truststore_linux.go @@ -82,7 +82,7 @@ func installPlatform(filename string, cert *x509.Certificate) error { return nil } -func uninstallPlatform(filename string, cert *x509.Certificate) error { +func uninstallPlatform(_ string, cert *x509.Certificate) error { if SystemTrustCommand == nil { return ErrNotSupported } diff --git a/truststore_nss.go b/truststore_nss.go index c3c3618be7f1898ef26c72f9f8c2961a8484c9ee..3cb45ee7189125ba8e1f2262eb2bcf42f2d8ddb7 100644 --- a/truststore_nss.go +++ b/truststore_nss.go @@ -80,7 +80,7 @@ func (t *NSSTrust) Install(filename string, cert *x509.Certificate) error { } // Uninstall implements the Trust interface. -func (t *NSSTrust) Uninstall(filename string, cert *x509.Certificate) (err error) { +func (t *NSSTrust) Uninstall(_ string, cert *x509.Certificate) (err error) { forEachNSSProfile(func(profile string) { if err != nil { return diff --git a/truststore_others.go b/truststore_others.go index 3d39fa5552080c92006d260778cc8f1dd8d08474..27451692eb53c5937cd8e2a9e906843e51dd833f 100644 --- a/truststore_others.go +++ b/truststore_others.go @@ -1,3 +1,4 @@ +//go:build !linux && !darwin && !windows && !freebsd // +build !linux,!darwin,!windows,!freebsd package truststore @@ -12,10 +13,10 @@ var ( CertutilInstallHelp = "" ) -func installPlatform(filename string, cert *x509.Certificate) error { +func installPlatform(string, *x509.Certificate) error { return ErrTrustNotSupported } -func uninstallPlatform(filename string, cert *x509.Certificate) error { +func uninstallPlatform(string, *x509.Certificate) error { return ErrTrustNotSupported }