mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-05-02 22:06:07 +00:00
Bump golangci-lint to 1.51.2 and fix lint issues
This commit is contained in:
@@ -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)."
|
||||
|
||||
@@ -70,6 +70,8 @@ function main() {
|
||||
with_modules 'tidy_cmd'
|
||||
;;
|
||||
'lint' | 'linter' | 'linters')
|
||||
golangci-lint --version
|
||||
echo
|
||||
with_modules 'lint_cmd'
|
||||
;;
|
||||
'test' | 'tests')
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user