Skip to content

Commit

Permalink
chore(deps): update golangci/golangci-lint docker tag to v1.61 (#166)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
renovate[bot] and tarampampam authored Sep 11, 2024
1 parent 476832c commit 1956cb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
security_opt: [no-new-privileges:true]

golint:
image: golangci/golangci-lint:v1.60-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
image: golangci/golangci-lint:v1.61-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
environment:
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
volumes:
Expand Down
16 changes: 8 additions & 8 deletions internal/cli/compress/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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())),
),
})
Expand Down Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1956cb4

Please sign in to comment.