Fix linter issues and test failures
- Fix spelling: cancelled → canceled, cancelling → canceling - Remove unused error return from performFlush() function - Check cmd.Help() error return in search.go - Fix file permissions in gitignore.go (0644 → 0600) - Update tests to match performFlush signature change - Remove unused os import from flush_manager.go
This commit is contained in:
@@ -41,10 +41,9 @@ Examples:
|
||||
// If no query provided, show help
|
||||
if query == "" {
|
||||
fmt.Fprintf(os.Stderr, "Error: search query is required\n")
|
||||
// #nosec G104 -- cmd.Help() error intentionally ignored. We're already in an
|
||||
// error path (missing query) and will exit(1) regardless. Help() errors are
|
||||
// rare (I/O failures) and don't affect the outcome. See TestSearchCommand_HelpErrorHandling
|
||||
cmd.Help()
|
||||
if err := cmd.Help(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error displaying help: %v\n", err)
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user