Skip to content

Commit

Permalink
[v4.4.1-crio] Remove failing staticcheck lints
Browse files Browse the repository at this point in the history
Three calls for lint for the below function:

```
        //nolint:staticcheck
	g := generate.NewFromSpec(c.config.Spec)
```
we failing with this error in the F37 builds:

libpod/container_internal_common.go:167:2: directive `//nolint:staticcheck` is unused for linter "staticcheck" (nolintlint)
	//nolint:staticcheck
	^

As the nolint lines have been removed from the main tree for the calls
to `generate.NewFromSpec()`, I'm going to try here as well.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
  • Loading branch information
TomSweeneyRedHat committed Jun 13, 2024
1 parent 802ddb3 commit 37c0810
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions libpod/container_internal_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {

// NewFromSpec() is deprecated according to its comment
// however the recommended replace just causes a nil map panic
//nolint:staticcheck
g := generate.NewFromSpec(c.config.Spec)

// If the flag to mount all devices is set for a privileged container, add
Expand Down Expand Up @@ -1205,7 +1204,6 @@ func (c *Container) generateContainerSpec() error {

// NewFromSpec() is deprecated according to its comment
// however the recommended replace just causes a nil map panic
//nolint:staticcheck
g := generate.NewFromSpec(c.config.Spec)

if err := c.saveSpec(g.Config); err != nil {
Expand Down
1 change: 0 additions & 1 deletion libpod/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,6 @@ func WithUserNSFrom(nsCtr *Container) CtrCreateOption {
}
// NewFromSpec() is deprecated according to its comment
// however the recommended replace just causes a nil map panic
//nolint:staticcheck
g := generate.NewFromSpec(ctr.config.Spec)

g.ClearLinuxUIDMappings()
Expand Down
1 change: 0 additions & 1 deletion libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai

// NewFromSpec() is deprecated according to its comment
// however the recommended replace just causes a nil map panic
//nolint:staticcheck
g := generate.NewFromSpec(ctr.config.Spec)
g.RemoveMount("/dev/shm")
ctr.config.ShmDir = ""
Expand Down

0 comments on commit 37c0810

Please sign in to comment.