Skip to content

Refactor glob.rs brace validation complexity #172

@coderabbitai

Description

@coderabbitai

Overview

The brace-validation and escape logic in src/manifest/glob.rs has become quite intricate and could benefit from simplification to reduce maintenance overhead.

Suggested Improvements

Consider one of the following approaches:

  1. Extract shared helpers: Move shared utilities like CharContext and BraceValidationState into a smaller internal utility module
  2. Use dedicated crate: Leverage an existing glob/brace-expansion crate to reduce custom implementation complexity

Context

This issue was identified during review of PR #168 which refactored the manifest module. The current implementation has:

  • Complex character processing logic with multiple state transitions
  • Intricate brace matching and validation rules
  • Platform-specific escape handling

Benefits

  • Reduced maintenance burden
  • Improved code readability
  • Potential bug reduction through battle-tested libraries
  • Better separation of concerns

References

Requested by: @leynos

Metadata

Metadata

Assignees

Labels

mediumCould be disruptive, but might not happen

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions