fix: lint issues#1358
Merged
Merged
Conversation
Signed-off-by: drew <me@andrinoff.com>
|
|
||
| dest := filepath.Join(pluginsDir, filename) | ||
| if err := os.WriteFile(dest, data, 0644); err != nil { | ||
| if err := os.WriteFile(dest, data, 0644); err != nil { //nolint:gosec |
| continue // File may not be encrypted | ||
| } | ||
| if err := os.WriteFile(f, plain, 0600); err != nil { | ||
| if err := os.WriteFile(f, plain, 0600); err != nil { //nolint:gosec |
| key := GetSessionKey() | ||
| if key == nil { | ||
| return os.WriteFile(path, data, perm) | ||
| return os.WriteFile(path, data, perm) //nolint:gosec |
| return err | ||
| } | ||
| return os.WriteFile(path, encrypted, perm) | ||
| return os.WriteFile(path, encrypted, perm) //nolint:gosec |
| defer in.Close() | ||
| out, err := os.OpenFile(tmpNew, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0755) | ||
| defer in.Close() //nolint:errcheck | ||
| out, err := os.OpenFile(tmpNew, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0755) //nolint:gosec |
| if f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644); err == nil { | ||
| if f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644); err == nil { //nolint:gosec | ||
| _, _ = f.WriteString(msg) | ||
| _ = f.Close() |
| if f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644); err == nil { | ||
| if f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644); err == nil { //nolint:gosec | ||
| _, _ = f.WriteString(msg) | ||
| _ = f.Close() |
| debugImageProtocol("remote fetch failed url=%s err=%v", url, err) | ||
| return "" | ||
| } | ||
| defer resp.Body.Close() |
| debugImageProtocol("remote fetch failed url=%s err=%v", url, err) | ||
| return "" | ||
| } | ||
| defer resp.Body.Close() |
Signed-off-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
| } | ||
|
|
||
| cmd := exec.Command(editor, target) | ||
| cmd := exec.Command(editor, target) //nolint:gosec,noctx |
|
|
||
| // Set socket permissions (owner only). | ||
| os.Chmod(sockPath, 0700) | ||
| os.Chmod(sockPath, 0700) //nolint:errcheck,gosec |
| } | ||
| if _, err := io.Copy(out, tr); err != nil { | ||
| out.Close() | ||
| if _, err := io.Copy(out, tr); err != nil { //nolint:gosec |
| if _, err := io.Copy(out, rc); err != nil { | ||
| out.Close() | ||
| rc.Close() | ||
| if _, err := io.Copy(out, rc); err != nil { //nolint:gosec |
Signed-off-by: drew <me@andrinoff.com>
Member
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Signed-off-by: drew <me@andrinoff.com>
Member
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Member
Author
|
/approve |
floatpanebot
approved these changes
May 23, 2026
Member
floatpanebot
left a comment
There was a problem hiding this comment.
Approved on behalf of @andrinoff via /approve command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Why?