Skip to content

Commit

Permalink
Skip errors on files with pr URI scheme (#1867)
Browse files Browse the repository at this point in the history
Much like git diffs with scheme `git`, viewing files surfaced from
GitHub Pull Requests that come from a branch not currently checked out
produces spurious errors since they are not real files on disk and have
extra data in their filenames. This uses the same strategy as in #1754
to avoid them by not loading things with the custom `pr` URI scheme.
  • Loading branch information
swernli authored Aug 21, 2024
1 parent 69c74d2 commit 1038ee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vscode/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export function isQsharpDocument(document: TextDocument): boolean {
return (
document.languageId === qsharpLanguageId &&
(Utils.extname(document.uri) === ".qs" || document.isUntitled) &&
document.uri.scheme !== "git"
document.uri.scheme !== "git" &&
document.uri.scheme !== "pr"
);
}

Expand Down

0 comments on commit 1038ee4

Please sign in to comment.