fix(doctor): add CLI text output for skillignore check

checkSkillignore only wrote to the JSON result but never printed
to the terminal, so skillignore status was invisible in CLI output.
This commit is contained in:
Willie
2026-03-18 00:19:30 +08:00
parent 49cd7c8433
commit af143a3330
2 changed files with 7 additions and 5 deletions
+2
View File
@@ -246,11 +246,13 @@ func printDoctorSummary(result *doctorResult) {
// checkSkillignore reports .skillignore status as an info or pass check.
func checkSkillignore(result *doctorResult, stats *skillignore.IgnoreStats) {
if stats == nil || !stats.Active() {
ui.Info("Skillignore: not configured")
result.addInfo("skillignore", "No .skillignore found — you can create one to hide skills from discovery")
return
}
msg := fmt.Sprintf(".skillignore: %d patterns, %d skills ignored", stats.PatternCount(), stats.IgnoredCount())
ui.Success("Skillignore: %d patterns, %d skills ignored", stats.PatternCount(), stats.IgnoredCount())
var details []string
details = append(details, stats.Patterns...)
if len(stats.IgnoredSkills) > 0 {
+5 -5
View File
@@ -213,12 +213,12 @@ func TestMatcherMatch(t *testing.T) {
func TestParseRule(t *testing.T) {
tests := []struct {
name string
line string
wantOK bool
negated bool
name string
line string
wantOK bool
negated bool
anchored bool
dirOnly bool
dirOnly bool
}{
{"blank line", "", false, false, false, false},
{"whitespace only", " ", false, false, false, false},