-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More validation and hints #64
Conversation
"definitions": { | ||
"invalid-command-substitution": { | ||
"type": "string", | ||
"pattern": "\\$\\(\\s*\\)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this preventing? $()
?
Is it important to prevent this specifically, and not other invalid strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this preventing? $()?
It prevents empty command substitutions like echo $()
.
Is it important to prevent this specifically, and not other invalid strings?
Can you provide examples what other strings it would be nice to prevent from being entered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even echo anything
is not expected to be there.
My point is, what is the point of limiting? This should be a simple list with all sorts of syntaxes available. Limiting can potentially prevent valid use cases that we haven't thought about.
I think that the original definition - list of strings - was sufficient to express what is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought an arbitrary shell command could be entered. I guess it's the root of my mistake. Should I close this PR?
--