-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adds errors for non-declared procedures #245
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4836ed8
Add warnings on functions that don't exist in the database
angrykoala 4ab9e38
Function not found is case insensitive in built-in functions
angrykoala c491d82
Fix warning range
angrykoala 9c995ba
Handles backtics on function names syntax validation
angrykoala cfa045b
Merge branch 'main' into database-functions-warning
angrykoala 906494d
Move helper methods to FunctionCollection
angrykoala 064fc8c
Procedure not found warning
angrykoala a51889e
Merge remote-tracking branch 'origin/main' into database-procedures-w…
ncordon 51add33
Collapses collectors
ncordon 4317071
Adds tests for procedure warnings
ncordon 31ccc8b
Enables remaining tests
ncordon 1729e62
Merge remote-tracking branch 'origin/main' into database-procedures-w…
ncordon 552a235
Throws errors instead of warnings
ncordon f43d083
Makes functions and procedures errors semantic ones
ncordon 2317281
Adds changeset
ncordon d040524
Removes inline snapshot thingy
ncordon b4f2bce
Merge branch 'main' into database-procedures-warning
ncordon ec9e8bb
Simplifies block
ncordon 023270b
Replaces filter with some
ncordon 30ddb3f
Merge remote-tracking branch 'origin' into database-procedures-warning
ncordon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@neo4j-cypher/language-support': patch | ||
--- | ||
|
||
Adds errors for undeclared procedures / functions |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
why rename this? I think even if "syntaxErrors" could be more desriptive, it's nice to match the type name imo
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.
It makes the code more readable in my opinion. Especially when we are using web workers and we need that logic of: no syntax errors, then execute the web worker. It reads better than diagnostics.
Another example is what has changed in
syntaxValidation.ts
:We know what's happening inside better than if it read diagnostics.
What we could do is rename this type:
where
Diagnostic
is coming from thevscode-types
. Any suggestions?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 don't feel very strongly about it & agree syntaxError reads better. Part of me was assuming there could be more than errors from a "Diagnostics" though
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.
It's beside the point but for the code example you could use
[some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
instead, it's more efficient as it stops iterating as soon as it finds a match