Skip to content

Refactor files for maintainability#125

Merged
fdncred merged 2 commits intomainfrom
refactor_0326
Mar 26, 2026
Merged

Refactor files for maintainability#125
fdncred merged 2 commits intomainfrom
refactor_0326

Conversation

@fdncred
Copy link
Contributor

@fdncred fdncred commented Mar 26, 2026

Refactor

Description of changes

  • Implemented garbage detection in the AST to identify Expr::Garbage nodes.
  • Introduced a new module for garbage detection with functions to check for garbage in blocks, pipelines, redirections, and expressions.
  • Added parse-error repair utilities to handle common issues like compact if/else patterns and missing commas in records.
  • Enhanced the formatting module to utilize garbage detection and repair strategies during formatting.
  • Updated tests to cover new functionality and ensure idempotency in formatting.

Relevant Issues

- Implemented garbage detection in the AST to identify `Expr::Garbage` nodes.
- Introduced a new module for garbage detection with functions to check for garbage in blocks, pipelines, redirections, and expressions.
- Added parse-error repair utilities to handle common issues like compact `if/else` patterns and missing commas in records.
- Enhanced the formatting module to utilize garbage detection and repair strategies during formatting.
- Updated tests to cover new functionality and ensure idempotency in formatting.
@fdncred fdncred merged commit 3982173 into main Mar 26, 2026
5 checks passed
@fdncred fdncred deleted the refactor_0326 branch March 26, 2026 17:59
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.

1 participant