feat: update acronym to 'Hushing' and fix backup creation bug
- Update SHUSH acronym from 'Hiding' to 'Hushing' (better reflects removal) - Fix critical error handling bug in file backup creation using io.Copy - Remove golangci-lint references from Makefile and CLAUDE.md - Update README, LLM guide, and CLI description with new acronym - Create TASKS.md to track project improvements
This commit is contained in:
@@ -4,6 +4,7 @@ import "fmt"
|
||||
|
||||
func Show() {
|
||||
fmt.Print(`# Shush CLI - LLM Guide
|
||||
**S**loppily **H**ushing **U**nwanted **S**ource-code **H**eavy (comments)
|
||||
|
||||
## Overview
|
||||
Shush is a fast comment removal tool for source code files using in-memory processing.
|
||||
|
||||
@@ -3,6 +3,7 @@ package processor
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -208,22 +209,8 @@ func (p *Processor) createBackup(filename string) error {
|
||||
}
|
||||
defer dstFile.Close()
|
||||
|
||||
buffer := make([]byte, 1024)
|
||||
for {
|
||||
n, err := srcFile.Read(buffer)
|
||||
if err != nil && err.Error() != "EOF" {
|
||||
return err
|
||||
}
|
||||
if n == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
if _, err := dstFile.Write(buffer[:n]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
_, err = io.Copy(dstFile, srcFile)
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *Processor) showPreview(filename string, language types.Language) error {
|
||||
|
||||
Reference in New Issue
Block a user