Skip to content

Commit c755c3d

Browse files
Show issue code and analyzer name in human output
Display issue metadata (e.g. "JS-0116 · JavaScript") alongside each issue title in the terminal output, making it easier to identify the source analyzer at a glance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1c368f commit c755c3d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

command/issues/issues.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,20 @@ func (opts *IssuesOptions) renderHumanIssues() error {
667667
severity := humanizeSeverity(g.Key.IssueSeverity)
668668
sevTag := style.IssueSeverityColor(g.Key.IssueSeverity, "["+severity+"]")
669669

670+
// Build metadata suffix: "issue-code · Analyzer Name"
671+
meta := g.Key.IssueCode
672+
if analyzerName := g.Issues[0].Analyzer.Name; analyzerName != "" {
673+
meta += " · " + analyzerName
674+
}
675+
670676
if len(g.Issues) == 1 {
671-
// Single occurrence: render exactly as before
672-
fmt.Fprintf(w, " %s %s\n", sevTag, g.Key.IssueText)
677+
fmt.Fprintf(w, " %s %s %s\n", sevTag, g.Key.IssueText, pterm.Gray("("+meta+")"))
673678
if opts.Verbose && g.Description != "" {
674679
fmt.Fprintf(w, " %s\n", pterm.Gray(g.Description))
675680
}
676681
fmt.Fprintf(w, " %s\n", pterm.Gray(formatLocation(g.Issues[0], cwd)))
677682
} else {
678-
// Multi-occurrence: show count + compact locations
679-
fmt.Fprintf(w, " %s %s (%d occurrences)\n", sevTag, g.Key.IssueText, len(g.Issues))
683+
fmt.Fprintf(w, " %s %s %s (%d occurrences)\n", sevTag, g.Key.IssueText, pterm.Gray("("+meta+")"), len(g.Issues))
680684
if opts.Verbose && g.Description != "" {
681685
fmt.Fprintf(w, " %s\n", pterm.Gray(g.Description))
682686
}

0 commit comments

Comments
 (0)