Skip to content

Commit 01bafcf

Browse files
fix(cli): remove noisy debug output from verbose mode
The LogProcessed functions were using log.Printf which includes file:line prefixes, making output look like debug logs. These lines were also redundant since the console formatter already shows ✓/✗ for each file. Changes: - Remove log import, use fmt.Fprintf for warnings - Make LogProcessed functions no-ops (kept for API compat) - Verbose mode now shows clean output without debug noise
1 parent 01c6eb8 commit 01bafcf

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

internal/cli/lintcontext.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cli
22

33
import (
44
"fmt"
5-
"log"
5+
"os"
66

77
"github.com/dotcommander/cclint/internal/cue"
88
"github.com/dotcommander/cclint/internal/discovery"
@@ -41,7 +41,7 @@ func NewLinterContext(rootPath string, quiet, verbose bool) (*LinterContext, err
4141
// Load schemas (soft failure - continue with Go validation)
4242
if err := validator.LoadSchemas(""); err != nil {
4343
if !quiet {
44-
log.Printf("Warning: CUE schemas not loaded, using Go validation")
44+
fmt.Fprintf(os.Stderr, "Warning: CUE schemas not loaded, using Go validation\n")
4545
}
4646
}
4747

@@ -87,16 +87,14 @@ func (ctx *LinterContext) NewSummary(totalFiles int) *LintSummary {
8787
}
8888
}
8989

90-
// LogProcessed logs file processing if verbose mode is enabled.
90+
// LogProcessed is a no-op - console formatter handles file status display.
91+
// Kept for API compatibility with callers.
9192
func (ctx *LinterContext) LogProcessed(filePath string, errorCount int) {
92-
if ctx.Verbose {
93-
log.Printf("Processed %s: %d errors", filePath, errorCount)
94-
}
93+
// No-op: console formatter shows ✓/✗ for each file
9594
}
9695

97-
// LogProcessedWithSuggestions logs file processing with suggestions if verbose mode is enabled.
96+
// LogProcessedWithSuggestions is a no-op - console formatter handles file status display.
97+
// Kept for API compatibility with callers.
9898
func (ctx *LinterContext) LogProcessedWithSuggestions(filePath string, errorCount, suggestionCount int) {
99-
if ctx.Verbose {
100-
log.Printf("Processed %s: %d errors, %d suggestions", filePath, errorCount, suggestionCount)
101-
}
99+
// No-op: console formatter shows ✓/✗ for each file
102100
}

0 commit comments

Comments
 (0)