Skip to content

Conversation

friedrichg
Copy link
Member

No description provided.

@friedrichg friedrichg changed the title Upgrade go to 1.24.6 Upgrade go to 1.24.6 and fix linters Sep 8, 2025
Signed-off-by: Friedrich Gonzalez <[email protected]>
Signed-off-by: Friedrich Gonzalez <[email protected]>
Signed-off-by: Friedrich Gonzalez <[email protected]>
Signed-off-by: Friedrich Gonzalez <[email protected]>
@@ -1,35 +0,0 @@
package exec
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this


// Add a blank line between cmd description and list of options
if fs.FlagCount() > 0 {
fmt.Fprintln(writer, "")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part appears to be part of the older docker project. I bet there is an updated version somewhere. Not fixing the bugs in this PR

@@ -1,33 +0,0 @@
package network
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this

@@ -1,24 +0,0 @@
package test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this

if err != nil {
return nil, err
}
defer fh.Close()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs/fs.go:34:16: Error return value of `fh.Close` is not checked (errcheck)
	defer fh.Close()

But cortexproject/cortex doesn't use this, so let's remove it

}

func (c *realCmd) SetEnv(env []string) {
c.Cmd.Env = env
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec/exec.go:34:4: QF1008: could remove embedded field "Cmd" from selector (staticcheck)
	c.Cmd.Env = env

head, tail := split(path)
fs, ok := p.entries[head]
if !ok {
return nil, fmt.Errorf("Not found: %s", path)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:89:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("Not found: %s", path)

head, tail := split(path)
fs, ok := p.entries[head]
if !ok {
return nil, fmt.Errorf("Not found: %s", path)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:117:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("Not found: %s", path)


func (p dir) ReadFile(path string) ([]byte, error) {
if path == "/" {
return nil, fmt.Errorf("I'm a directory")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:130:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("I'm a directory")

fmt.Printf("Error updating scheduler: %v\n", err)
} else {
resp.Body.Close()
resp.Body.Close() //nolint:errcheck
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea if changing this means anything

@friedrichg friedrichg marked this pull request as draft September 8, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant