mirror of
https://github.com/lukaszraczylo/filepuff-mcp.git
synced 2026-10-20 05:57:51 +00:00
style: use fmt.Fprintf instead of WriteString(fmt.Sprintf) (staticcheck QF1012)
Mechanical fix applied by golangci-lint --fix. Pre-existing debt that fails the staticcheck QF1012 quickfix check; no behavior change. Clears the lint gate so subsequent commits in this package set pass.
This commit is contained in:
@@ -389,13 +389,13 @@ func (s *Searcher) FormatResultsWithOptions(results *SearchResults, opts FormatO
|
||||
if opts.Verbose {
|
||||
totalMatches := len(results.Results)
|
||||
fileCount := len(fileResults)
|
||||
sb.WriteString(fmt.Sprintf("Found %d matches in %d files", totalMatches, fileCount))
|
||||
fmt.Fprintf(&sb, "Found %d matches in %d files", totalMatches, fileCount)
|
||||
if results.Truncated {
|
||||
sb.WriteString(fmt.Sprintf(" (truncated, total: %d)", results.Total))
|
||||
fmt.Fprintf(&sb, " (truncated, total: %d)", results.Total)
|
||||
}
|
||||
sb.WriteString(":\n\n")
|
||||
} else if results.Truncated {
|
||||
sb.WriteString(fmt.Sprintf("(truncated, showing subset of %d total matches)\n\n", results.Total))
|
||||
fmt.Fprintf(&sb, "(truncated, showing subset of %d total matches)\n\n", results.Total)
|
||||
}
|
||||
|
||||
// Write results grouped by file
|
||||
@@ -408,7 +408,7 @@ func (s *Searcher) FormatResultsWithOptions(results *SearchResults, opts FormatO
|
||||
}
|
||||
}
|
||||
|
||||
sb.WriteString(fmt.Sprintf("**%s**\n", relPath))
|
||||
fmt.Fprintf(&sb, "**%s**\n", relPath)
|
||||
|
||||
if opts.Cluster {
|
||||
writeClusteredResults(&sb, fileResults[file])
|
||||
|
||||
Reference in New Issue
Block a user