-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: only set the file in the diagnostics message if the file is within the source root #12742
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
JS: only set the file in the diagnostics message if the file is within the source root #12742
Conversation
Optional content flow through constructors remains.
Again, this is hacky; we don't distinguish rigorously between an optional value and its content (similar to how it was before enum content flow).
…eorder Ruby: Order synthetic children in PrintAST based on their index instead of location
…-data Java: Docs MaD using extensions.
…direct-type-inference python: Fix link to type inference
…-binary C#: Improve cs/web/debug-binary to repect the RemoveAttributes transformation.
python: port `py/comparison-using-is`
…l-namespace RB: always resolve toplevel namespaces to their locally qualified name
…for-javascript.rst Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
…in-use` Notice that it doesn't find the potentially unsafe version, or the vuln that spans calls.
…-java-libs-to-dataflow-modules Java: Refactor Java query libraries to use dataflow modules
…-call-to-strncat C++: Fix join order in `cpp/unsafe-strncat`
…ly-extracted-lines Swift: add `SuccessfullyExtractedLines` query
QL: Make Class.getType() only return ClassType
JS: Fix qhelp after file rename
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.
LGTM
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.
Perhaps this should be for the rc/3.9 branch
if (file.startsWith(LGTM_SRC)) { | ||
relativeFilePath = file.subpath(LGTM_SRC.getNameCount(), file.getNameCount()).toString(); | ||
builder = builder.setFile(file.subpath(LGTM_SRC.getNameCount(), file.getNameCount()).toString()); |
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.
Should we skip diagnostics, or perhaps just diagnostic locations, for files outside the source root? I'm not sure how useful it is to have a location with a range but without a file path.
Sorry for the ping, bad change of branch. |
This should fix #12734
I wasn't able to replicate locally, but the stack-trace in the issue provided enough information.
It was this change that caused the null-pointer: #12113 (comment)