Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mfleader committed Jan 31, 2024
1 parent a8cd2ab commit c9302fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linters:
# comment with // nolint:gosec where not relevant.
- gosec
# Replace golint.
- revive
# - revive
# Complain about deeply nested if cases.
- nestif
# Prevent naked returns in long functions.
Expand All @@ -30,7 +30,7 @@ linters:
- gocritic
# We don't want hidden global scope, so disallow global variables. You can disable this with
# Check if comments end in a period. This helps prevent incomplete comment lines, such as half-written sentences.
- godot
# - godot
# Complain about comments as these indicate incomplete code.
- godox
# Keep the cyclomatic complexity of functions to a reasonable level.
Expand Down Expand Up @@ -70,7 +70,7 @@ linters:
# Check for improper duration handling.
- durationcheck
# Enforce tests being in the _test package.
- testpackage
# - testpackage

# endregion
linters-settings:
Expand Down
2 changes: 0 additions & 2 deletions cli_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ type CliPlugin struct {
stdout io.ReadCloser
}

// TODO: unwrap the whole config

func (p *CliPlugin) Write(b []byte) (n int, err error) {
return p.stdin.Write(b)
}
Expand Down
2 changes: 1 addition & 1 deletion factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (f factory) Create(config *Config, logger log.Logger) (deployer.Connector,
} else {
rngSeed = config.Podman.RngSeed
}
rng := rand.New(rand.NewSource(rngSeed))
rng := rand.New(rand.NewSource(rngSeed)) //nolint:gosec // random number is not security credentials

var containerNamePrefix string
if config.Podman.ContainerNamePrefix == "" {
Expand Down
4 changes: 2 additions & 2 deletions internal/cliwrapper/cliwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (p *cliWrapper) ImageExists(image string) (*bool, error) {
p.logger.Debugf("Checking whether image exists with command %v", cmd.Args)
if err := cmd.Run(); err != nil {
return nil, fmt.Errorf(
"error while determining if image exists. Stdout: '%s', Stderr: '%s', Cmd error: '%s'",
"error while determining if image exists. Stdout: '%s', Stderr: '%s', Cmd error: (%w)",
out.String(), errOut.String(), err)
}
outStr := out.String()
Expand All @@ -66,7 +66,7 @@ func (p *cliWrapper) PullImage(image string, platform *string) error {
cmd.Stderr = &errOut
if err := cmd.Run(); err != nil {
return fmt.Errorf(
"error while pulling image. Stdout: '%s', Stderr: '%s', Cmd error: '%s'",
"error while pulling image. Stdout: '%s', Stderr: '%s', Cmd error: (%w)",
out.String(), errOut.String(), err)
}
return nil
Expand Down

0 comments on commit c9302fa

Please sign in to comment.