mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
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:
@@ -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 {
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user