diff --git a/bin/lint b/bin/lint index a849bab71..f27464c1a 100755 --- a/bin/lint +++ b/bin/lint @@ -2,7 +2,7 @@ set -eu -lintversion=1.25.1 +lintversion=1.43.0 cd "$(pwd -P)" diff --git a/cli/cmd/install.go b/cli/cmd/install.go index 7059169db..02ec77d7e 100644 --- a/cli/cmd/install.go +++ b/cli/cmd/install.go @@ -216,6 +216,10 @@ A full list of configurable values can be found at https://www.github.com/linker func newCmdInstall() *cobra.Command { values, err := l5dcharts.NewValues() + if err != nil { + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) + } var options valuespkg.Options allStageFlags, allStageFlagSet := makeAllStageFlags(values) diff --git a/cli/cmd/uninstall.go b/cli/cmd/uninstall.go index 53d53b80d..504ebb8df 100644 --- a/cli/cmd/uninstall.go +++ b/cli/cmd/uninstall.go @@ -55,7 +55,7 @@ This command provides all Kubernetes namespace-scoped and cluster-scoped resourc extensionNames = append(extensionNames, fmt.Sprintf("* %s", v)) } - fmt.Fprintln(os.Stderr, fmt.Sprintf("Please uninstall the following extensions before uninstalling the control-plane:\n\t%s", strings.Join(extensionNames, "\n\t"))) + fmt.Fprintf(os.Stderr, "Please uninstall the following extensions before uninstalling the control-plane:\n\t%s\n", strings.Join(extensionNames, "\n\t")) fail = true } @@ -73,7 +73,7 @@ This command provides all Kubernetes namespace-scoped and cluster-scoped resourc } if len(injectedPods) > 0 { - fmt.Fprintln(os.Stderr, fmt.Sprintf("Please uninject the following pods before uninstalling the control-plane:\n\t%s", strings.Join(injectedPods, "\n\t"))) + fmt.Fprintf(os.Stderr, "Please uninject the following pods before uninstalling the control-plane:\n\t%s\n", strings.Join(injectedPods, "\n\t")) fail = true } diff --git a/test/integration/smimetrics/smi-metrics_test.go b/test/integration/smimetrics/smi-metrics_test.go index 0607ecf5c..6401b9829 100644 --- a/test/integration/smimetrics/smi-metrics_test.go +++ b/test/integration/smimetrics/smi-metrics_test.go @@ -14,6 +14,7 @@ import ( var TestHelper *testutil.TestHelper +//nolint // The test that uses this is currently skipped. type testCase struct { name string kind string diff --git a/viz/cmd/tap.go b/viz/cmd/tap.go index 26108c9b2..0bbd1a28c 100644 --- a/viz/cmd/tap.go +++ b/viz/cmd/tap.go @@ -437,7 +437,7 @@ func renderTapEventJSON(event *tapPb.TapEvent, _ string) string { if err != nil { return fmt.Sprintf("{\"error marshalling JSON\": \"%s\"}", err) } - return fmt.Sprintf("%s", e) + return string(e[:]) } // Map public API `TapEvent`s to `displayTapEvent`s diff --git a/viz/metrics-api/http_server_test.go b/viz/metrics-api/http_server_test.go index 90a2cc703..bc7ed5c76 100644 --- a/viz/metrics-api/http_server_test.go +++ b/viz/metrics-api/http_server_test.go @@ -106,7 +106,8 @@ func getServerVizClient(t *testing.T) (*mockGrpcServer, pb.ApiClient) { } err := http.Serve(listener, handler) if err != nil { - t.Fatalf("Could not start server: %v", err) + t.Errorf("Could not start server: %v", err) + return } }()