From 2a7de01b7d48d9a0704fe412a189afadc205695e Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Wed, 3 Feb 2021 12:25:48 -0800 Subject: [PATCH 1/2] Exclude .git folder from PoliCheck --- .vsts-ci/templates/release-general.yml | 1 + tools/terms/UserExclusions.xml | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tools/terms/UserExclusions.xml diff --git a/.vsts-ci/templates/release-general.yml b/.vsts-ci/templates/release-general.yml index 527e00e33c..9333e130e2 100644 --- a/.vsts-ci/templates/release-general.yml +++ b/.vsts-ci/templates/release-general.yml @@ -62,6 +62,7 @@ steps: suppressionsFile: '' # TermCheck AKA PoliCheck targetArgument: '$(Build.SourcesDirectory)/PowerShellEditorServices' + optionsUEPATH: '$(Build.SourcesDirectory)/PowerShellEditorServices/tools/terms/UserExclusions.xml' optionsRulesDBPath: '' optionsFTPath: '$(Build.SourcesDirectory)/PowerShellEditorServices/tools/terms/FileTypeSet.xml' # tsa-upload diff --git a/tools/terms/UserExclusions.xml b/tools/terms/UserExclusions.xml new file mode 100644 index 0000000000..f7ff9f7b92 --- /dev/null +++ b/tools/terms/UserExclusions.xml @@ -0,0 +1,12 @@ + + + + + .GIT + + + + + + + From dd839211f0864e44de5d1c09e7d41251b143bcf4 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Wed, 3 Feb 2021 13:26:09 -0800 Subject: [PATCH 2/2] Fix issues caught by PoliCheck --- .../Services/PowerShellContext/PowerShellContextService.cs | 4 ++-- .../Debugging/DebugServiceTests.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs b/src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs index 556d86a6c4..eabf76b970 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs @@ -635,7 +635,7 @@ public Task GetRunspaceHandleAsync(CancellationToken cancellatio if (shouldCancelReadLine && PromptNest.IsReadLineBusy()) { - // If a ReadLine pipeline is running in the debugger then we'll hang here + // If a ReadLine pipeline is running in the debugger then we'll stop responding here // if we don't cancel it. Typically we can rely on OnExecutionStatusChanged but // the pipeline request won't even start without clearing the current task. this.ConsoleReader?.StopCommandLoop(); @@ -1895,7 +1895,7 @@ private void PowerShellContext_RunspaceChangedAsync(object sender, RunspaceChang // TODO: Refactor this, RunspaceDetails, PowerShellVersion, and PowerShellVersionDetails - // It's crazy that this is 4 different types. + // It's odd that this is 4 different types. // P.S. MinifiedRunspaceDetails use to be called RunspaceDetails... as in, there were 2 DIFFERENT // RunspaceDetails types in this codebase but I've changed it to be minified since the type is // slightly simpler than the other RunspaceDetails. diff --git a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs index c6915186f3..fbf70b5f36 100644 --- a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs @@ -1,4 +1,4 @@ -// TODO: Fix these tests which cause the test runner to hang... +// TODO: Fix these tests which cause the test runner to stop responding... // // // // Copyright (c) Microsoft. All rights reserved.