From 6f306e815f1113b188b13c13dcd4575cf4f06aa6 Mon Sep 17 00:00:00 2001 From: kat <28567881+hk21702@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:51:20 -0500 Subject: [PATCH] Linter fixes --- cmd/insights/commands/root_test.go | 3 ++- cmd/insights/commands/upload.go | 2 +- internal/collector/collector.go | 2 ++ internal/consent/consent.go | 2 ++ internal/uploader/uploader.go | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/insights/commands/root_test.go b/cmd/insights/commands/root_test.go index 061a6d0..bceed6c 100644 --- a/cmd/insights/commands/root_test.go +++ b/cmd/insights/commands/root_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/ubuntu/ubuntu-insights/internal/constants" ) @@ -49,7 +50,7 @@ func TestSetVerbosity(t *testing.T) { func TestUsageError(t *testing.T) { app, err := New() - assert.NoError(t, err) + require.NoError(t, err) // Test when SilenceUsage is true app.rootCmd.SilenceUsage = true diff --git a/cmd/insights/commands/upload.go b/cmd/insights/commands/upload.go index 0764afc..6f680c3 100644 --- a/cmd/insights/commands/upload.go +++ b/cmd/insights/commands/upload.go @@ -26,7 +26,7 @@ func installUploadCmd(app *App) { app.uploadConfig = defaultUploadConfig uploadCmd := &cobra.Command{ - Use: "upload upload [sources](optional arguments)", + Use: "upload [sources](optional arguments)", Short: "Upload metrics to the Ubuntu Insights server", Long: "Upload metrics to the Ubuntu Insights server", Args: cobra.ArbitraryArgs, diff --git a/internal/collector/collector.go b/internal/collector/collector.go index 66f94de..8995073 100644 --- a/internal/collector/collector.go +++ b/internal/collector/collector.go @@ -1 +1,3 @@ +// Package collector is the implementation of the collector component. +// The collector component is responsible for collecting data from sources, merging it into a report, and then writing the report to disk. package collector diff --git a/internal/consent/consent.go b/internal/consent/consent.go index 42d2f3b..cfa37d9 100644 --- a/internal/consent/consent.go +++ b/internal/consent/consent.go @@ -1 +1,3 @@ +// Package consent is the implementation of the consent manager component. +// The consent manager is responsible for managing consent files, which are used to store the consent state for a source or the global consent state. package consent diff --git a/internal/uploader/uploader.go b/internal/uploader/uploader.go index 01aafa6..b1c189e 100644 --- a/internal/uploader/uploader.go +++ b/internal/uploader/uploader.go @@ -1 +1,3 @@ +// Package uploader implements the uploader component. +// The uploader component is responsible for uploading reports to the Ubuntu Insights server. package uploader