Commit Graph
85 Commits
Author SHA1 Message Date
carraes 40b50f0dd5 chore: remove .claude directory from git tracking 2025-07-06 12:00:41 -03:00
carraes d4295b4329 docs(readme): document --preserve-lines flag and indentation safety 2025-07-06 11:21:24 -03:00
carraes 70a2dd7612 fix(processor): preserve indentation and implement proper line deletion 2025-07-06 11:21:24 -03:00
carraes 4f54db9c8e feat(cli): add --preserve-lines flag for line structure control 2025-07-06 11:21:24 -03:00
carraes 34e194e70c docs: update architecture documentation for in-memory processing 2025-07-06 11:21:24 -03:00
carraes 28501c6823 refactor(processor): migrate from sed to unified in-memory processing 2025-07-06 11:21:24 -03:00
carraes 67d101212f fix(hooks): improve uninstall safety with jq and better fallback handling 2025-07-06 11:21:24 -03:00
carraes 9e372f5f52 docs: update documentation for v0.2.0 features
- Add configuration system documentation with TOML examples
- Document Claude Code hooks integration (now available)
- Update CLI options with new hook management commands
- Add string-aware parsing and comment preservation features
- Update architecture overview with new packages and flow
2025-07-06 09:04:34 -03:00
carraes 39e3c27f34 fix(processor): add string-aware comment detection to prevent URL corruption
- Implement findCommentIndex function that respects string boundaries
- Preserve URLs and strings containing '//' (e.g., https://example.com)
- Handle escaped quotes and multiple quote types (single, double, backtick)
- Prevent data corruption in config files and code containing URLs
2025-07-06 09:04:19 -03:00
carraes 48848b2cbd style: fix formatting and indentation consistency
- Remove extra blank lines and fix indentation in test files
- Ensure consistent struct field alignment in git types
2025-07-05 23:44:48 -03:00
carraes ca7821b015 fix(processor): resolve syntax errors in sed command generation
- Fix broken string literals in buildSedCommand function
- Ensure proper sed command formatting for both line and block comments
2025-07-05 23:44:21 -03:00
carraes 62790b245e fix(git): handle non-tracked files gracefully in diff operations
- Return empty line ranges when git diff fails for non-tracked files
- Prevents hook failures on .claude/settings.local.json and similar files
- Improves robustness when processing files outside git tracking
2025-07-05 23:44:10 -03:00
carraes 20135b3a7f feat(processor): integrate config-based comment preservation in git mode
- Load .shush.toml configuration for pattern-based comment preservation
- Add preserved comment tracking and display in dry-run output
- Enhance preview with cyan 'P' indicators for preserved comments
- Add preserved count to summary statistics and totals
- Support both line and block comment preservation based on patterns
2025-07-05 23:43:59 -03:00
carraes f53439ddda feat(cli): add configuration and hooks management commands
- Add --config flag to show current configuration and search paths
- Add --create-config flag to generate example .shush.toml files
- Add hook management flags: --install-hook, --uninstall-hook, --list-hooks, --hook-status
- Implement cross-scope conflict detection with clear error messages
- Add -s flag for hook scope selection (user-wide vs project-specific)
2025-07-05 23:43:46 -03:00
carraes b0c91ab16f feat(hooks): add Claude Code hooks integration with conflict detection
- Support user-wide and project-specific hook installation
- Automatic shush execution on Write|Edit|MultiEdit events
- Cross-scope conflict detection prevents duplicate execution
- JSON settings management with proper merging logic
2025-07-05 23:43:30 -03:00
carraes f32698d06e feat(config): add TOML configuration system with wildcard pattern matching
- Add .shush.toml config file discovery (project > git root > global)
- Support exact patterns (TODO:, @ts-ignore) and wildcards (*IMPORTANT*)
- Include smart defaults for common comment preservation patterns
- Add config validation and example file generation
2025-07-05 23:43:17 -03:00
carraes 92a959c8c2 chore: add TOML dependency for configuration support 2025-07-05 23:43:04 -03:00
carraes 9fbde41140 docs: update README and CLAUDE.md with git-aware features and hooks preview
- Add git-aware processing examples and flag documentation to README
- Include Claude Code hooks integration preview for v0.2.0
- Update CLAUDE.md architecture to reflect current dual-mode design
- Document completed git features and planned hooks integration
- Enhance project descriptions with current capabilities
2025-07-05 22:45:32 -03:00
carraes e405f1158e chore: bump version to 0.1.3 2025-07-05 22:28:54 -03:00
carraes 801c55b07d style: fix formatting consistency in languages.go 2025-07-05 22:28:39 -03:00
carraes 79b6d28791 feat(processor): add git-aware comment removal with line-based processing
- Add processGitChanges() for git-aware operation routing
- Implement line-based comment removal with precise targeting
- Add GitTotals tracking for comprehensive dry-run reporting
- Create showGitPreviewWithTotals() with enhanced preview display
- Fix spacing preservation (only trim when comments are removed)
- Include comprehensive test suite for comment removal logic
2025-07-05 22:28:27 -03:00
carraes 161b5e1862 feat(cli): add git-aware CLI flags and validation
- Add ChangesOnly, Staged, Unstaged flags to CLI struct
- Implement git flag validation with mutual exclusion rules
- Add comprehensive flag compatibility checks
- Update LLM guide with git workflow examples and documentation
- Include test suite for CLI validation logic
2025-07-05 22:28:13 -03:00
carraes 36c10aefdf feat(git): add git-aware file change detection infrastructure
- Add GitStatus, FileChange, LineRange types for git integration
- Implement DetectRepo() for repository detection
- Add GetStagedChanges() and GetUnstagedChanges() functions
- Create ParseDiffUnified() for git diff parsing
- Add line range utilities for precise change targeting
- Include comprehensive test suite for git operations
2025-07-05 22:28:00 -03:00
carraes cc41807975 feat: add comprehensive Makefile and update CLAUDE.md
- Add Makefile with common development commands:
  * Build targets (dev/optimized/cross-platform)
  * Code quality checks (lint, vet, fmt, test)
  * Release management (tag, push, version)
  * Development helpers (watch, demo, clean)
- Update CLAUDE.md with Makefile-based workflow
- Add development workflow guidance
- Include comprehensive help system with colored output
2025-07-05 21:57:10 -03:00
carraes b7408d52e9 feat: add --llm flag and update README with directory support
- Add --llm flag for comprehensive LLM-friendly usage guide
- Update README with directory processing examples
- Add recursive flag documentation
- Update version to 0.1.2
- Comprehensive LLM guide covers all usage patterns, supported languages, and best practices
2025-07-03 14:38:45 -03:00
carraes 65c576d298 docs: add CLAUDE.md for future Claude Code instances 2025-07-03 14:33:15 -03:00
carraes 8fdfbc7f06 fix: preserve blank lines while removing comments
- Remove comment-only lines completely
- Strip inline comments but preserve the line
- Keep original blank lines intact
- Maintain file structure and spacing
- Update version to 0.1.1
2025-07-03 14:30:30 -03:00
carraes 406dc32879 fix: add missing cmd/shush/main.go and update gitignore 2025-07-03 14:26:20 -03:00
carraes 37bbe92319 feat: refactor to proper Go structure and add folder/recursive support
- Refactor to cmd/internal structure following Go best practices
- Add support for processing directories (files in folder)
- Add -r/--recursive flag for recursive directory traversal
- Split code into logical packages: types, processor, languages
- Fix --version flag to work properly with kong
- Update build path in GitHub Actions workflow
- Version bump to 0.1.0 for new major features
2025-07-03 14:25:18 -03:00
carraes 82b967c7c3 fix: remove duplicate file copy in workflow 2025-07-03 14:17:02 -03:00
carraes 9bf3a847b2 fix: revert version back to 0.0.2 2025-07-03 14:13:39 -03:00
carraes 9c24fd8a38 fix: resolve race condition in GitHub Actions workflow
- Use artifact pattern instead of parallel release uploads
- Build jobs upload artifacts, single release job creates release
- Eliminates "already_exists" race condition
- All binaries now included in release properly
2025-07-03 14:11:59 -03:00
carraes a943f92cbe feat: add colored preview for dry-run mode
- Add fatih/color for terminal colors
- Show lines to be deleted in red with strikethrough
- Show lines to be kept in green
- Display line numbers and summary counts
- Much more helpful than just showing sed command
2025-07-03 14:00:40 -03:00
carraes 26db074156 docs: add README with installation and usage instructions 2025-07-03 13:54:08 -03:00
carraes 8b4778c682 feat: initial implementation of shush comment removal tool 2025-07-03 13:49:41 -03:00