-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add some commonly used QL snippets #782
Conversation
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.
This looks nicely comprehensive. Thanks!
I think in general, any snippet placeholder that must be added should have a default value. If nothing else, this just signifies where a user can edit.
"/**", | ||
" * @name $1", | ||
" * @description $2", | ||
" * @kind $3", |
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.
Either add a choice here, or separate this into multiple snippets, one for each metadata kind.
https://code.visualstudio.com/docs/editor/userdefinedsnippets#_choice
}, | ||
"From/Where/Select": { | ||
"prefix": "from", | ||
"body": ["from $1", "where $2", "select $3"], |
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 find it easier to read if there are default values for each replacement step.
"body": ["from $1", "where $2", "select $3"], | |
"body": ["from ${1:params}", "where ${2:clause}", "select ${2:args}"], |
fe07fed
to
db33630
Compare
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.
Nice work!
@github/docs-content-dsp Is this the kind of thing that should go in the documentation? |
Looks exciting 😄 I've opened an internal docs issue where we can assess if/where we need to document this. |
This PR addresses #392 by introducing some simple snippets for query metadata, classes, from/where/select statements, predicates, dataflow/taint tracking classes, and all the aggregates and quantifiers.