Skip to content
Snippets Groups Projects
Unverified Commit 11e16400 authored by Mariano Cano's avatar Mariano Cano
Browse files

Fix linter errors

parent 52f0bf51
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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 {
......
......@@ -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),
......
......@@ -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
}
......
......@@ -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
......
//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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment