lintcmd: don't panic looking up analyzer for "staticcheck" category
@@ -139,8 +139,11 @@ func (l *linter) Lint(cfg *packages.Config, patterns []string) (LintResult, erro
// OPT move this code into the 'success' function.
for i, diag := range filtered {
a := l.Analyzers[diag.Category]
+ // Some diag.Category don't map to analyzers, such as "staticcheck"
+ if a != nil {
filtered[i].MergeIf = a.Doc.MergeIf
}
+ }
out.Diagnostics = append(out.Diagnostics, filtered...)
for _, obj := range resd.Unused.Used {
