Commit Graph

6 Commits

Author SHA1 Message Date
Jeremiah Russell
8f908df8f3 refactor(rules): apply idiomatic patterns and resolve clippy warnings
- Change add_rule parameter from Option<&String> to Option<&str> for better ergonomics
- Use iterator methods (flat_map, any) instead of manual loops and collections
- Collapse nested if conditions using let-else patterns
- Use format string interpolation instead of separate arguments
- Avoid unnecessary String allocations in label comparisons
- Update CLI code to use as_deref() for Option<String> to Option<&str> conversion
- Update all documentation examples and tests to match new API
- All functionality preserved; API is more idiomatic and efficient
2025-10-19 08:52:23 +01:00
Jeremiah Russell
5c2124ead4 🐛 fix(cli): correct error mapping in add_cli
- fix error mapping for message age creation
- use direct error propagation instead of config error mapping
2025-10-19 07:54:12 +01:00
Jeremiah Russell
dd16da8740 🐛 fix(rules): handle message age creation error
- handle the error when creating MessageAge and return a ConfigError::Message
2025-10-19 07:54:12 +01:00
Jeremiah Russell
972f3bb264 ♻️ refactor(cli): remove redundant Rules import
- remove redundant `Rules` import from several files in `src/cli`
- this change simplifies the code by removing unnecessary imports
2025-10-15 12:39:20 +01:00
Jeremiah Russell
0bc71f5b75 ♻️ refactor: rename Config to Rules
- rename Config struct to Rules to better reflect its purpose
- update all references to Config to Rules
2025-10-15 12:39:20 +01:00
Jeremiah Russell
3beab7d82d ♻️ refactor(cli): restructure cli commands for better organization
- rename `label_cli.rs` to `labels_cli.rs`
- rename `message_cli.rs` to `messages_cli.rs`
- move config related commands to `rules config` subcommand
- introduce `rules run` subcommand
2025-10-15 11:00:14 +01:00