Skip to content

Commit 634e2a9

Browse files
author
Kapil Borle
committed
Update ScriptFileMarkersRequestParams class
1 parent 7af07bd commit 634e2a9

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/PowerShellEditorServices.Protocol/LanguageServer/ScriptFileMarkersRequest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public static readonly
1717
class ScriptFileMarkerRequestParams
1818
{
1919
public string filePath;
20-
public string[] rules;
2120
public string settings;
2221
}
2322

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ private async Task HandleScriptFileMarkersRequest(
239239
{
240240
var markers = editorSession.AnalysisService.GetSemanticMarkers(
241241
editorSession.Workspace.GetFile(requestParams.filePath),
242-
requestParams.rules,
243242
editorSession.LanguageService.GetHashtableFromString(requestParams.settings));
244243
await requestContext.SendResult(new ScriptFileMarkerRequestResultParams {
245244
markers = markers

src/PowerShellEditorServices/Analysis/AnalysisService.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,9 @@ public ScriptFileMarker[] GetSemanticMarkers(ScriptFile file)
139139
return GetSemanticMarkers(file, activeRules, settingsPath);
140140
}
141141

142-
public ScriptFileMarker[] GetSemanticMarkers(ScriptFile file, string[] rules, string settingsPath)
142+
public ScriptFileMarker[] GetSemanticMarkers(ScriptFile file, Hashtable settings)
143143
{
144-
return GetSemanticMarkers<string>(file, rules, settingsPath);
145-
}
146-
147-
public ScriptFileMarker[] GetSemanticMarkers(ScriptFile file, string[] rules, Hashtable settings)
148-
{
149-
return GetSemanticMarkers<Hashtable>(file, rules, settings);
144+
return GetSemanticMarkers<Hashtable>(file, null, settings);
150145
}
151146

152147
private ScriptFileMarker[] GetSemanticMarkers<TSettings>(
@@ -156,8 +151,8 @@ private ScriptFileMarker[] GetSemanticMarkers<TSettings>(
156151
{
157152
if (this.scriptAnalyzerModuleInfo != null
158153
&& file.IsAnalysisEnabled
159-
&& (typeof(TSettings) == typeof(string)
160-
|| typeof(TSettings) == typeof(Hashtable)))
154+
&& (typeof(TSettings) == typeof(string) || typeof(TSettings) == typeof(Hashtable))
155+
&& (rules != null || settings != null))
161156
{
162157
// TODO: This is a temporary fix until we can change how
163158
// ScriptAnalyzer invokes their async tasks.

0 commit comments

Comments
 (0)