From 1956cb4fae758e06bcc8f6e008b529669b957694 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:25:23 +0400 Subject: [PATCH] chore(deps): update golangci/golangci-lint docker tag to v1.61 (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update golangci/golangci-lint docker tag to v1.61 * wip: 🔕 temporary commit --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com> --- compose.yml | 2 +- internal/cli/compress/command.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compose.yml b/compose.yml index 0a9fe7f..f3880ea 100644 --- a/compose.yml +++ b/compose.yml @@ -15,7 +15,7 @@ services: security_opt: [no-new-privileges:true] golint: - image: golangci/golangci-lint:v1.60-alpine # Image page: + image: golangci/golangci-lint:v1.61-alpine # Image page: environment: GOLANGCI_LINT_CACHE: /tmp/golint # volumes: diff --git a/internal/cli/compress/command.go b/internal/cli/compress/command.go index 4aec33f..c33f776 100644 --- a/internal/cli/compress/command.go +++ b/internal/cli/compress/command.go @@ -98,7 +98,7 @@ func NewCommand() *cli.Command { //nolint:funlen Name: threadsCountFlagName, Aliases: []string{"t"}, Usage: "threads count", - Value: uint(runtime.NumCPU() * 6), //nolint:mnd + Value: uint(runtime.NumCPU() * 6), //nolint:mnd,gosec EnvVars: []string{env.ThreadsCount.String()}, }, &cli.UintFlag{ @@ -260,7 +260,7 @@ workersLoop: tbl.AppendFooter(table.Row{"", "", fmt.Sprintf("Total saved (%d files)", stats.TotalFiles()), fmt.Sprintf("%s (%s)", // Saved - humanize.IBytes(uint64(stats.TotalSavedBytes())), + humanize.IBytes(uint64(stats.TotalSavedBytes())), //nolint:gosec cmd.percentageDiff(float64(stats.TotalCompressedSize()), float64(stats.TotalOriginalSize())), ), }) @@ -311,7 +311,7 @@ func (cmd *command) ProcessFile( //nolint:funlen // STEP 1. Upload the file to TinyPNG server tracker.SetValue(stepUpload) - tracker.UpdateMessage(fmt.Sprintf("%s uploading (%s)", fileName, humanize.IBytes(uint64(origFileStat.Size())))) + tracker.UpdateMessage(fmt.Sprintf("%s uploading (%s)", fileName, humanize.IBytes(uint64(origFileStat.Size())))) //nolint:gosec,lll compressed, compErr := cmd.Upload(ctx, pool, filePath) if compErr != nil { @@ -322,7 +322,7 @@ func (cmd *command) ProcessFile( //nolint:funlen return err } - if size := uint64(origFileStat.Size()); size <= compressed.Size() { + if size := uint64(origFileStat.Size()); size <= compressed.Size() { //nolint:gosec tracker.UpdateMessage(fmt.Sprintf("%s skipped (original size less than compressed)", fileName)) return nil @@ -365,15 +365,15 @@ func (cmd *command) ProcessFile( //nolint:funlen tracker.UpdateMessage(fmt.Sprintf( "%s compressed (%s → %s)", fileName, - humanize.IBytes(uint64(origFileStat.Size())), - humanize.IBytes(uint64(tmpFileStat.Size())), + humanize.IBytes(uint64(origFileStat.Size())), //nolint:gosec + humanize.IBytes(uint64(tmpFileStat.Size())), //nolint:gosec )) stats.Push(ctx, CompressionStat{ FilePath: filePath, FileType: compressed.Type(), - OriginalSize: uint64(origFileStat.Size()), - CompressedSize: uint64(tmpFileStat.Size()), + OriginalSize: uint64(origFileStat.Size()), //nolint:gosec + CompressedSize: uint64(tmpFileStat.Size()), //nolint:gosec }) tracker.MarkAsDone()