skip outputting lsif snapshot for files located outside the sourceroot#195
Merged
Conversation
olafurpg
approved these changes
May 4, 2021
| } { | ||
| SnapshotCommand.writeSnapshot(doc, finalOutput) | ||
| val docPath = AbsolutePath.of(Path.of(doc.getUri), sourceroot).toRealPath() | ||
| if (docPath.toAbsolutePath.startsWith(sourceroot)) { |
Contributor
There was a problem hiding this comment.
FYI, you can define variables and add if conditions inside for comprehensions. Not relevant in this diff here but could be useful if you want to continue to drill deeper into a data structure
olafurpg
reviewed
May 4, 2021
59f5410 to
7d2382c
Compare
…apshotLsifCommand.scala Co-authored-by: Ólafur Páll Geirsson <olafurpg@gmail.com>
7d2382c to
ac795b3
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes the following exception being thrown when a document in the LSIF dump points to a file outside the source root. They get filtered out by the backend anyways so I see no reason to come up with a way to display them in the snapshot