Merge pull request #930 from calumgrant/cs/suppress-alerts

C#: Add some alert suppression comments
This commit is contained in:
Tom Hvitved
2019-02-13 09:34:18 +01:00
committed by GitHub
4 changed files with 6 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.

View File

@@ -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");