Skip to content

Conversation

coiby
Copy link

@coiby coiby commented Oct 11, 2025

Resolves: #5

The Parameters:value construct in shellspec is a standalone declaration that doesn't require wrapping with braces like other DSL constructs. Previously, altshfmt was adding opening braces after Parameters:value lines but no matching closing braces, causing shfmt to fail with "reached EOF without matching { with }".

This fix adds special handling for Parameters:value to skip brace wrapping while preserving correct behavior for other Parameters variants (block, matrix, dynamic) that do require braces.

Resolves: shellspec#5

The Parameters:value construct in shellspec is a standalone declaration
that doesn't require wrapping with braces like other DSL constructs.
Previously, altshfmt was adding opening braces after Parameters:value
lines but no matching closing braces, causing shfmt to fail with
"reached EOF without matching { with }".

This fix adds special handling for Parameters:value to skip brace
wrapping while preserving correct behavior for other Parameters
variants (block, matrix, dynamic) that do require braces.

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Coiby Xu <[email protected]>
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.

altshfmt failed with error "reached EOF without matching { with }"

1 participant