Skip to content
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

Only run diagnostics on PowerShell files #1241

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use fake uri instead of null
  • Loading branch information
TylerLeonhardt committed Mar 24, 2020
commit 97eb79293ce6038d54c96a23e9af8bbe58967857
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public Task<Unit> Handle(DidOpenTextDocumentParams notification, CancellationTok
notification.TextDocument.Text);

if (LspUtils.PowerShellDocumentSelector.IsMatch(new TextDocumentAttributes(
// We use null because we only want to test the LanguageId here and not if the
// We use a fake Uri because we only want to test the LanguageId here and not if the
// file ends in ps*1.
null,
new Uri("Untitled:file"),
TylerLeonhardt marked this conversation as resolved.
Show resolved Hide resolved
notification.TextDocument.LanguageId)))
{
// Kick off script diagnostics if we got a PowerShell file without blocking the response
Expand Down