mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
make lint: enable wastedassign
Because we shouldn't waste assigns. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
parent
60a5a59475
commit
f07aa1bfdc
4 changed files with 2 additions and 4 deletions
|
|
@ -21,7 +21,6 @@ linters:
|
|||
# useful hints that should be addressed
|
||||
- ginkgolinter
|
||||
- nakedret
|
||||
- wastedassign
|
||||
- gosmopolitan # usage of time.Local in pkg/k8s.io
|
||||
- tagliatelle # too many JSON keys cannot be changed due to compat
|
||||
- nosnakecase # too many false positives due to the `unix` package
|
||||
|
|
|
|||
|
|
@ -2463,7 +2463,6 @@ func (c *Container) setHomeEnvIfNeeded() error {
|
|||
}
|
||||
|
||||
// Ensure HOME is not already set in Env
|
||||
home := ""
|
||||
for _, s := range c.config.Spec.Process.Env {
|
||||
if strings.HasPrefix(s, "HOME=") {
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -750,7 +750,7 @@ func (c *Container) safeMountSubPath(mountPoint, subpath string) (s *safeMountIn
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
npath := ""
|
||||
var npath string
|
||||
switch {
|
||||
case fi.Mode()&fs.ModeSymlink != 0:
|
||||
return nil, fmt.Errorf("file %q is a symlink", joinedPath)
|
||||
|
|
|
|||
|
|
@ -1488,7 +1488,7 @@ func readConmonPipeData(runtimeName string, pipe *os.File, ociLog string) (int,
|
|||
ch <- syncStruct{si: si}
|
||||
}()
|
||||
|
||||
data := -1
|
||||
var data int
|
||||
select {
|
||||
case ss := <-ch:
|
||||
if ss.err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue