Skip to content

Commit

Permalink
Fixing Appveyor build; making the VS analyzer happy
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletGiraffe committed Jul 30, 2020
1 parent e833e82 commit 2c01f7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CPPCheckPlugin/CPPCheckPluginPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static CPPCheckPluginPackage Instance
get { return _instance; }
}

public static async void addTextToOutputWindow(string text)
public static async Task AddTextToOutputWindowAsync(string text)
{
try
{
Expand Down Expand Up @@ -332,7 +332,7 @@ private void documentSavedSync(Document document)
if (_outputPane != null)
{
_outputPane.Clear();
addTextToOutputWindow("Exception occurred in cppcheck add-in: " + ex.Message);
_ = AddTextToOutputWindowAsync("Exception occurred in cppcheck add-in: " + ex.Message);
}
DebugTracer.Trace(ex);
}
Expand Down
8 changes: 4 additions & 4 deletions CPPCheckPlugin/ICodeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void startAnalyzerProcess(string analyzerExePath, string arguments)
process.OutputDataReceived += new DataReceivedEventHandler(this.analyzerOutputHandler);
process.ErrorDataReceived += new DataReceivedEventHandler(this.analyzerOutputHandler);

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

var timer = Stopwatch.StartNew();
// Start the process.
Expand Down Expand Up @@ -235,11 +235,11 @@ private void startAnalyzerProcess(string analyzerExePath, string arguments)
timer.Stop();
analysisFinished(arguments);
if (process.ExitCode != 0)
CPPCheckPluginPackage.addTextToOutputWindow(analyzerExePath + " has exited with code " + process.ExitCode.ToString() + "\n");
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync(analyzerExePath + " has exited with code " + process.ExitCode.ToString() + "\n");
else
{
double timeElapsed = Math.Round(timer.Elapsed.TotalSeconds, 3);
CPPCheckPluginPackage.addTextToOutputWindow("Analysis completed in " + timeElapsed.ToString() + " seconds\n");
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync("Analysis completed in " + timeElapsed.ToString() + " seconds\n");
}
process.Close();
process = null;
Expand Down Expand Up @@ -280,7 +280,7 @@ private void analyzerOutputHandler(object sendingProcess, DataReceivedEventArgs
{
addProblemsToToolwindow(parseOutput(output));
try {
CPPCheckPluginPackage.addTextToOutputWindow(output + "\n");
_ = CPPCheckPluginPackage.AddTextToOutputWindowAsync(output + "\n");
}
catch (Exception) { }
}
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.3.{build}
image: Visual Studio 2017
version: 1.4.{build}
image: Visual Studio 2019
configuration: Release
platform: Any CPU
assembly_info:
Expand Down

0 comments on commit 2c01f7a

Please sign in to comment.