Skip to content
This repository was archived by the owner on Aug 9, 2025. It is now read-only.

Commit 2c01f7a

Browse files
committed
Fixing Appveyor build; making the VS analyzer happy
1 parent e833e82 commit 2c01f7a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CPPCheckPlugin/CPPCheckPluginPackage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static CPPCheckPluginPackage Instance
4747
get { return _instance; }
4848
}
4949

50-
public static async void addTextToOutputWindow(string text)
50+
public static async Task AddTextToOutputWindowAsync(string text)
5151
{
5252
try
5353
{
@@ -332,7 +332,7 @@ private void documentSavedSync(Document document)
332332
if (_outputPane != null)
333333
{
334334
_outputPane.Clear();
335-
addTextToOutputWindow("Exception occurred in cppcheck add-in: " + ex.Message);
335+
_ = AddTextToOutputWindowAsync("Exception occurred in cppcheck add-in: " + ex.Message);
336336
}
337337
DebugTracer.Trace(ex);
338338
}

CPPCheckPlugin/ICodeAnalyzer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private void startAnalyzerProcess(string analyzerExePath, string arguments)
204204
process.OutputDataReceived += new DataReceivedEventHandler(this.analyzerOutputHandler);
205205
process.ErrorDataReceived += new DataReceivedEventHandler(this.analyzerOutputHandler);
206206

207-
CPPCheckPluginPackage.addTextToOutputWindow("Starting analyzer with arguments: " + arguments + "\n");
207+
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync("Starting analyzer with arguments: " + arguments + "\n");
208208

209209
var timer = Stopwatch.StartNew();
210210
// Start the process.
@@ -235,11 +235,11 @@ private void startAnalyzerProcess(string analyzerExePath, string arguments)
235235
timer.Stop();
236236
analysisFinished(arguments);
237237
if (process.ExitCode != 0)
238-
CPPCheckPluginPackage.addTextToOutputWindow(analyzerExePath + " has exited with code " + process.ExitCode.ToString() + "\n");
238+
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync(analyzerExePath + " has exited with code " + process.ExitCode.ToString() + "\n");
239239
else
240240
{
241241
double timeElapsed = Math.Round(timer.Elapsed.TotalSeconds, 3);
242-
CPPCheckPluginPackage.addTextToOutputWindow("Analysis completed in " + timeElapsed.ToString() + " seconds\n");
242+
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync("Analysis completed in " + timeElapsed.ToString() + " seconds\n");
243243
}
244244
process.Close();
245245
process = null;
@@ -280,7 +280,7 @@ private void analyzerOutputHandler(object sendingProcess, DataReceivedEventArgs
280280
{
281281
addProblemsToToolwindow(parseOutput(output));
282282
try {
283-
CPPCheckPluginPackage.addTextToOutputWindow(output + "\n");
283+
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync(output + "\n");
284284
}
285285
catch (Exception) { }
286286
}

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: 1.3.{build}
2-
image: Visual Studio 2017
1+
version: 1.4.{build}
2+
image: Visual Studio 2019
33
configuration: Release
44
platform: Any CPU
55
assembly_info:

0 commit comments

Comments
 (0)