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:
carraes
2025-07-07 09:31:37 -03:00
parent 8152e62cf5
commit 79b20776fc
6 changed files with 12 additions and 26 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ make build
# Quick development build (faster, unoptimized) # Quick development build (faster, unoptimized)
make build-dev make build-dev
# Run all checks (format, vet, lint, test) # Run all checks (format, vet, test) - NOTE: We don't use golangci-lint
make check make check
# Development cycle (build + quick test) # Development cycle (build + quick test)
+5 -8
View File
@@ -43,13 +43,10 @@ test-cover: ## Run tests with coverage
go tool cover -html=coverage.out -o coverage.html go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html" @echo "Coverage report: coverage.html"
# Code quality # Code quality - NOTE: We don't use golangci-lint in this project
lint: ## Run golangci-lint lint: ## Run basic linting (go vet only)
@if command -v golangci-lint >/dev/null 2>&1; then \ @echo "Running basic linting with go vet..."
golangci-lint run; \ go vet ./...
else \
echo "golangci-lint not installed. Install with: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"; \
fi
fmt: ## Format code fmt: ## Format code
go fmt ./... go fmt ./...
@@ -57,7 +54,7 @@ fmt: ## Format code
vet: ## Run go vet vet: ## Run go vet
go vet ./... go vet ./...
check: fmt vet lint test ## Run all checks (format, vet, lint, test) check: fmt vet test ## Run all checks (format, vet, test)
# Dependency management # Dependency management
deps: ## Download dependencies deps: ## Download dependencies
+1
View File
@@ -1,4 +1,5 @@
# shush 🤫 # shush 🤫
**S**loppily **H**ushing **U**nwanted **S**ource-code **H**eavy (comments)
Remove comments from source code files blazingly fast using in-memory processing. Features git-aware processing, smart comment preservation, and Claude Code integration. Remove comments from source code files blazingly fast using in-memory processing. Features git-aware processing, smart comment preservation, and Claude Code integration.
+1 -1
View File
@@ -17,7 +17,7 @@ var version = "0.2.1"
func main() { func main() {
var cliArgs types.CLI var cliArgs types.CLI
kong.Parse(&cliArgs, kong.Parse(&cliArgs,
kong.Description("Remove comments from source code files"), kong.Description("SHUSH: Sloppily Hushing Unwanted Source-code Heavy"),
kong.Vars{"version": version}) kong.Vars{"version": version})
if cliArgs.LLM { if cliArgs.LLM {
+1
View File
@@ -4,6 +4,7 @@ import "fmt"
func Show() { func Show() {
fmt.Print(`# Shush CLI - LLM Guide fmt.Print(`# Shush CLI - LLM Guide
**S**loppily **H**ushing **U**nwanted **S**ource-code **H**eavy (comments)
## Overview ## Overview
Shush is a fast comment removal tool for source code files using in-memory processing. Shush is a fast comment removal tool for source code files using in-memory processing.
+3 -16
View File
@@ -3,6 +3,7 @@ package processor
import ( import (
"bufio" "bufio"
"fmt" "fmt"
"io"
"io/fs" "io/fs"
"os" "os"
"path/filepath" "path/filepath"
@@ -208,22 +209,8 @@ func (p *Processor) createBackup(filename string) error {
} }
defer dstFile.Close() defer dstFile.Close()
buffer := make([]byte, 1024) _, err = io.Copy(dstFile, srcFile)
for { return err
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
} }
func (p *Processor) showPreview(filename string, language types.Language) error { func (p *Processor) showPreview(filename string, language types.Language) error {