-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: disable specific staticcheck rules and update lint config #4396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* 'master' of github.com:gogf/gf: refactor: interface{} to any and reflect.Ptr to reflect.Pointer (#4395) perf(net/gclient): optimize default http.Transport connection pool configuration (#4390) fix: revert #4388 (#4392) # Conflicts: # encoding/gini/gini.go # encoding/gproperties/gproperties.go # util/gconv/internal/converter/converter_scan.go
…gcl-lint * 'fix/golangcl-lint' of github.com:gogf/gf: Apply gci import order changes # Conflicts: # os/gtime/gtime.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes linting issues by disabling specific staticcheck rules and updating the lint configuration. The changes primarily address deprecated API usage and simplify code patterns to align with modern Go practices.
- Replaced deprecated
strings.Title()
withcases.Title()
from golang.org/x/text - Refactored string formatting to use
fmt.Fprintf()
instead offmt.Sprintf()
for buffer operations - Updated loop patterns to use simpler for-range syntax and removed unnecessary variables
Reviewed Changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
.golangci.yml | Updated Go version and exit code configuration |
.github/workflows/golangci-lint.yml | Changed workflow name formatting |
Multiple Go files | Replaced fmt.Sprintf() + buffer.WriteString() with fmt.Fprintf() for performance |
text/gstr/gstr_upper_lower.go | Replaced deprecated strings.Title() with cases.Title() |
Various files | Simplified loop constructs and removed unused variables |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
@houseme 我直接让ai重构了HideStr函数,读起来没那么绕 |
fix: disable specific staticcheck rules and update lint config
.golangci.yml
to filter out unwanted linter errors.