Skip to content

Commit 5cb6f07

Browse files
refactor(plugins): simplify linting output to errors only
Streamlined plugin validation to focus on critical issues by showing only errors. Warnings and suggestions are now suppressed for plugins to reduce noise and align with Anthropic's plugin patterns where many suggestions don't apply. Changes: - Filter validation issues to show errors only - Promote secrets detection to errors (critical security issue) - Skip warnings and suggestions for plugin manifests
1 parent 4def6eb commit 5cb6f07

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

internal/cli/plugins.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,24 @@ func LintPlugins(rootPath string, quiet bool, verbose bool) (*LintSummary, error
4444
summary.TotalErrors++
4545
} else {
4646
// Validate plugin-specific rules
47+
// NOTE: Only show errors for plugins until we can improve the suggestions
4748
allIssues := validatePluginSpecific(data, file.RelPath, file.Contents)
4849
for _, issue := range allIssues {
49-
switch issue.Severity {
50-
case "suggestion":
51-
result.Suggestions = append(result.Suggestions, issue)
52-
summary.TotalSuggestions++
53-
case "warning":
54-
result.Warnings = append(result.Warnings, issue)
55-
summary.TotalWarnings++
56-
default:
50+
if issue.Severity == "error" {
5751
result.Errors = append(result.Errors, issue)
5852
summary.TotalErrors++
5953
}
54+
// Skip suggestions and warnings for plugins
6055
}
6156

62-
// Secrets detection
57+
// Secrets detection - keep as errors only for plugins
6358
secretWarnings := detectSecrets(file.Contents, file.RelPath)
64-
result.Warnings = append(result.Warnings, secretWarnings...)
65-
summary.TotalWarnings += len(secretWarnings)
59+
for _, w := range secretWarnings {
60+
// Promote secrets to errors since they're important
61+
w.Severity = "error"
62+
result.Errors = append(result.Errors, w)
63+
summary.TotalErrors++
64+
}
6665

6766
if len(result.Errors) == 0 {
6867
summary.SuccessfulFiles++

0 commit comments

Comments
 (0)