-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add baseline option for analyze command #2371
Conversation
This pull request introduces 2 alerts when merging 69728b4 into 744db99 - view on LGTM.com new alerts:
|
using (var reader = new JsonTextReader(new StreamReader(fileSystem.FileOpenRead(options.BaselineSarifFile)))) | ||
{ | ||
baselineFile = serializer.Deserialize<SarifLog>(reader); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can replace this by:
baselineFile = SarifLog.Load(optons.BaselineSarifFile)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I inject a mock IFileSystem to SarifLog for test cases?
using (var reader = new JsonTextReader(new StreamReader(fileSystem.FileOpenRead(options.OutputFilePath)))) | ||
{ | ||
currentSarifLog = serializer.Deserialize<SarifLog>(reader); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use this:
currentSarifLog = SarifLog.Load(xyz)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.