Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update golangci/golangci-lint docker tag to v1.61 #166

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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