Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

houseme
Copy link
Member

@houseme houseme commented Aug 28, 2025

fix: disable specific staticcheck rules and update lint config

  • Disabled staticcheck rules SA1029, SA1019, S1000, and related checks in .golangci.yml to filter out unwanted linter errors.
  • Updated staticcheck checks list for more precise linting control.
  • Clarified configuration for easier maintenance and future updates.

* '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
@houseme houseme requested a review from hailaz August 28, 2025 11:03
@houseme
Copy link
Member Author

houseme commented Aug 28, 2025

@copilot

@houseme houseme requested a review from hailaz August 28, 2025 15:41
…gcl-lint

* 'fix/golangcl-lint' of github.com:gogf/gf:
  Apply gci import order changes

# Conflicts:
#	os/gtime/gtime.go
@hailaz hailaz requested a review from Copilot August 29, 2025 01:34
Copy link
Contributor

@Copilot Copilot AI left a 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() with cases.Title() from golang.org/x/text
  • Refactored string formatting to use fmt.Fprintf() instead of fmt.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.

@hailaz
Copy link
Contributor

hailaz commented Aug 29, 2025

@houseme 我直接让ai重构了HideStr函数,读起来没那么绕

@hailaz hailaz merged commit 94cc233 into master Aug 29, 2025
27 checks passed
@hailaz hailaz deleted the fix/golangcl-lint branch August 29, 2025 02:32
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.

2 participants