Commit Graph
13 Commits
Author SHA1 Message Date
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 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 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 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 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