Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

EmilyGraceSeville7cf
Copy link
Collaborator

  • check command substitution format
  • suggest sample property names
  • suggest --

"definitions": {
"invalid-command-substitution": {
"type": "string",
"pattern": "\\$\\(\\s*\\)"
Copy link
Owner

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?

Copy link
Collaborator Author

@EmilyGraceSeville7cf EmilyGraceSeville7cf Mar 4, 2024

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?

Copy link
Owner

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.

Copy link
Collaborator Author

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?

@DannyBen DannyBen closed this Mar 21, 2024
@DannyBen DannyBen deleted the feat/more-validation-and-hints branch March 21, 2024 05:13
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.

2 participants