Bump golangci-lint to 1.51.2 and fix lint issues

This commit is contained in:
Joshua Casey
2023-03-16 13:13:49 -05:00
parent a783a5d6b2
commit fc0f9d959a
10 changed files with 24 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright 2022 the Pinniped contributors. All Rights Reserved.
# Copyright 2022-2023 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
@@ -15,7 +15,7 @@ go version
# so you can get the same results when running the linter locally.
# Whenever the linter is updated in the CI pipelines, it should also be
# updated here to make local development more convenient.
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
golangci-lint --version
echo "Finished. You may need to run 'rehash' in your current shell before using the new version (e.g. if you are using gvm)."

View File

@@ -70,6 +70,8 @@ function main() {
with_modules 'tidy_cmd'
;;
'lint' | 'linter' | 'linters')
golangci-lint --version
echo
with_modules 'lint_cmd'
;;
'test' | 'tests')

View File

@@ -1,8 +1,8 @@
package main
// Copyright 2023 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package main
import (
"fmt"
"log"