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)
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
# 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
@echo "Coverage report: coverage.html"
# Code quality
lint: ## Run golangci-lint
@if command -v golangci-lint >/dev/null 2>&1; then \
golangci-lint run; \
else \
echo "golangci-lint not installed. Install with: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"; \
fi
# Code quality - NOTE: We don't use golangci-lint in this project
lint: ## Run basic linting (go vet only)
@echo "Running basic linting with go vet..."
go vet ./...
fmt: ## Format code
go fmt ./...
@@ -57,7 +54,7 @@ fmt: ## Format code
vet: ## Run 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
deps: ## Download dependencies
+1
View File
@@ -1,4 +1,5 @@
# 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.
+1 -1
View File
@@ -17,7 +17,7 @@ var version = "0.2.1"
func main() {
var cliArgs types.CLI
kong.Parse(&cliArgs,
kong.Description("Remove comments from source code files"),
kong.Description("SHUSH: Sloppily Hushing Unwanted Source-code Heavy"),
kong.Vars{"version": version})
if cliArgs.LLM {
+1
View File
@@ -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.
+2 -15
View File
@@ -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" {
_, err = io.Copy(dstFile, srcFile)
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 {