mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix: disable specific staticcheck rules and update lint config (#4396)
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. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hailaz <739476267@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -103,7 +103,7 @@ func filterLinesOfStackInfos(infos []*stackInfo) {
|
||||
func formatStackInfos(infos []*stackInfo) string {
|
||||
buffer := bytes.NewBuffer(nil)
|
||||
for i, info := range infos {
|
||||
buffer.WriteString(fmt.Sprintf("%d. %s\n", i+1, info.Message))
|
||||
fmt.Fprintf(buffer, "%d. %s\n", i+1, info.Message)
|
||||
if info.Lines != nil && info.Lines.Len() > 0 {
|
||||
formatStackLines(buffer, info.Lines)
|
||||
}
|
||||
@ -124,10 +124,11 @@ func formatStackLines(buffer *bytes.Buffer, lines *list.List) string {
|
||||
if i >= 9 {
|
||||
space = " "
|
||||
}
|
||||
buffer.WriteString(fmt.Sprintf(
|
||||
fmt.Fprintf(
|
||||
buffer,
|
||||
" %d).%s%s\n %s\n",
|
||||
i+1, space, line.Function, line.FileLine,
|
||||
))
|
||||
)
|
||||
}
|
||||
return buffer.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user