Parameter Expansion Updates#290
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Panic message references old renamed type name
- Updated the panic message to reference the correct type name DeclarePrintMissingVariableTestCase instead of the old name DeclarePrintErrorTestCase.
Or push these changes by commenting:
@cursor push adee86d828
Preview (adee86d828)
diff --git a/internal/test_cases/declare_print_missing_variable_test_case.go b/internal/test_cases/declare_print_missing_variable_test_case.go
--- a/internal/test_cases/declare_print_missing_variable_test_case.go
+++ b/internal/test_cases/declare_print_missing_variable_test_case.go
@@ -22,7 +22,7 @@
}
if !isValidIdentifier(t.Variable) {
- panic(fmt.Sprintf("Codecrafters Internal Error - DeclarePrintErrorTestCase called on invalid identifier %s", t.Variable))
+ panic(fmt.Sprintf("Codecrafters Internal Error - DeclarePrintMissingVariableTestCase called on invalid identifier %s", t.Variable))
}
testCase := CommandResponseTestCase{You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 991d4f4. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
Medium Risk
Updates multiple parameter-expansion stages and assertions, which can change pass/fail outcomes across different shells and user implementations. Risk is moderate because it alters the tester’s canonical expectations for identifier validity and expansion behavior.
Overview
Parameter expansion stage tests are updated to be stricter and more representative. Missing-variable printing via
declare -pis renamed/clarified asDeclarePrintMissingVariableTestCaseand now hard-fails if invoked with an invalid identifier.Identifier validation coverage is expanded. Stage
pex4adds an additional invalid assignment case (hyphens in variable names) andDeclareAssignmentTestCasebroadens zsh-compatible fallback patterns to distinguish digit-prefixed vs mid-string invalid characters.Argument expansion scenarios are strengthened. Stages
pex5–pex7now assert expansions embedded within words (both bare$VARand braced${VAR}forms), braced expansions at word boundaries with literal suffixes, and mixed missing-variable expansions, with fixture expectations updated accordingly.Reviewed by Cursor Bugbot for commit b565635. Bugbot is set up for automated code reviews on this repo. Configure here.