mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #930 from calumgrant/cs/suppress-alerts
C#: Add some alert suppression comments
This commit is contained in:
@@ -242,7 +242,7 @@ namespace Semmle.Autobuild
|
||||
{
|
||||
actions.DirectoryDelete(dir, true);
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
return FailureCode;
|
||||
}
|
||||
@@ -262,7 +262,7 @@ namespace Semmle.Autobuild
|
||||
{
|
||||
actions.FileDelete(file);
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
return FailureCode;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace Semmle.Extraction.CIL.Entities
|
||||
decoded = new Instruction(cx, this, ilbytes, offset, child++);
|
||||
offset += decoded.Width;
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Semmle.BuildAnalyser
|
||||
// Microsoft.Build is not cross platform.
|
||||
ReadMsBuildProject(filename);
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
// There was some reason why the project couldn't be loaded.
|
||||
// Fall back to reading the Xml document directly.
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace Semmle.Util
|
||||
{
|
||||
return GetRealPath(path);
|
||||
}
|
||||
catch
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
// File does not exist
|
||||
return ConstructCanonicalPath(path, cache);
|
||||
@@ -248,7 +248,7 @@ namespace Semmle.Util
|
||||
(PathStrategy)new GetFinalPathNameByHandleStrategy() :
|
||||
(PathStrategy)new PosixSymlinkStrategy();
|
||||
}
|
||||
catch (Exception)
|
||||
catch // lgtm[cs/catch-of-all-exceptions]
|
||||
{
|
||||
// Failed to late-bind a suitable library.
|
||||
logger.Log(Severity.Warning, "Preserving symlinks in canonical paths");
|
||||
|
||||
Reference in New Issue
Block a user