Skip to content

Add sort-only mode feature (Issue #9)#17

Merged
dvrkn merged 1 commit intomasterfrom
feature/sort-only-option
Jul 2, 2025
Merged

Add sort-only mode feature (Issue #9)#17
dvrkn merged 1 commit intomasterfrom
feature/sort-only-option

Conversation

@dvrkni
Copy link
Copy Markdown
Collaborator

@dvrkni dvrkni commented Jul 2, 2025

Summary

  • Implements issue [Feature] Sort only option #9: Sort only option that allows sorting YAML files without performing any diffing operations
  • Adds new --sort-only CLI flag for sort-only mode
  • Provides configuration file support with sort_only option
  • Updates README.md with comprehensive documentation and examples

Features Added

  • New CLI flag: --sort-only enables sort-only mode
  • Configuration support: sort_only: true in config files
  • Pattern matching: Works with both individual files and glob patterns
  • Output flexibility: Supports in-place modification (-i) and custom output directories (-o)
  • Validation: Requires and validates sort configuration file
  • Workflow isolation: Complete separation from diff functionality

Usage Examples

# Sort files and output to ./out directory
./yabe --sort-only --sort-config-path sort-config.yaml file1.yaml file2.yaml

# Sort files in-place (modify original files)
./yabe --sort-only --sort-config-path sort-config.yaml -i file1.yaml file2.yaml

# Sort files using path patterns
./yabe --sort-only --sort-config-path sort-config.yaml -p "*.yaml"

Test plan

  • Basic sort functionality with single files
  • In-place modification mode (-i flag)
  • Path pattern matching (-p flag)
  • Error handling for missing sort config
  • Help documentation verification
  • All existing tests continue to pass
  • Configuration file support

🤖 Generated with Claude Code

Implements issue #9: Sort only option that allows sorting YAML files without performing any diffing operations.

Features:
- New --sort-only CLI flag for sort-only mode
- Configuration file support with sort_only option
- Works with both individual files and glob patterns
- Supports in-place modification and custom output directories
- Validates sort configuration file requirements
- Complete workflow isolation from diff functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dvrkn dvrkn merged commit 852fcac into master Jul 2, 2025
5 checks passed
@dvrkn dvrkn mentioned this pull request Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants