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
cache uri
  • Loading branch information
TylerLeonhardt committed Mar 24, 2020
commit 04320a1ab4fd3816ad8f4e66fc85cd4d57deeb0c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Microsoft.PowerShell.EditorServices.Handlers
{
class TextDocumentHandler : ITextDocumentSyncHandler
{
private static readonly Uri s_fakeUri = new Uri("Untitled:fake");

private readonly ILogger _logger;
private readonly AnalysisService _analysisService;
Expand Down Expand Up @@ -85,7 +86,7 @@ public Task<Unit> Handle(DidOpenTextDocumentParams notification, CancellationTok
if (LspUtils.PowerShellDocumentSelector.IsMatch(new TextDocumentAttributes(
// We use a fake Uri because we only want to test the LanguageId here and not if the
// file ends in ps*1.
new Uri("Untitled:file"),
s_fakeUri,
notification.TextDocument.LanguageId)))
{
// Kick off script diagnostics if we got a PowerShell file without blocking the response
Expand Down