You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[plan] Filter Chmod events in watch mode to reduce noise #5177
Filter out fsnotify.Chmod events in the watch mode event handler to reduce processing noise from file indexing tools, backup software, and other system utilities.
Context
The current implementation in pkg/cli/compile_command.go:866-910 processes all file system events. However, Chmod events (permission/attribute changes) are rarely useful for detecting workflow changes and create unnecessary noise in logs and processing.
Approach
In the event handling switch statement, add filtering to skip Chmod events before other processing:
caseevent, ok:=<-watcher.Events:
if!ok {
returnfmt.Errorf("watcher channel closed")
}
// Filter out Chmod events (noisy and usually not useful)ifevent.Has(fsnotify.Chmod) {
continue
}
// Only process markdown files and ignore lock filesif!strings.HasSuffix(event.Name, ".md") {
continue
}
// ... rest of event processing
Activity