mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
C#: Suppress cs/catch-of-all-exceptions
This commit is contained in:
@@ -112,7 +112,7 @@ namespace Semmle.Autobuild
|
||||
var o = JObject.Parse(File.ReadAllText(path));
|
||||
version = (string)o["sdk"]["version"];
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
// not a valid global.json file
|
||||
continue;
|
||||
|
||||
@@ -63,7 +63,8 @@ namespace Semmle.Autobuild
|
||||
ToolsVersion = new Version(toolsVersion);
|
||||
ValidToolsVersion = true;
|
||||
}
|
||||
catch // Generic catch clause - Version constructor throws about 5 different exceptions.
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
// Generic catch clause - Version constructor throws about 5 different exceptions.
|
||||
{
|
||||
builder.Log(Severity.Warning, "Project {0} has invalid tools version {1}", path, toolsVersion);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace Semmle.Util
|
||||
entries[0] :
|
||||
Path.Combine(parentPath, name);
|
||||
}
|
||||
catch (Exception)
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
// IO error or security error querying directory.
|
||||
return Path.Combine(parentPath, name);
|
||||
|
||||
Reference in New Issue
Block a user