-
Notifications
You must be signed in to change notification settings - Fork 94
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
#2227 Move Transform functionality into Rewrite #2252
#2227 Move Transform functionality into Rewrite #2252
Conversation
src/Sarif.Multitool/Program.cs
Outdated
(MergeOptions mergeOptions) => new MergeCommand().Run(mergeOptions), | ||
(PageOptions pageOptions) => new PageCommand().Run(pageOptions), | ||
(QueryOptions queryOptions) => new QueryCommand().Run(queryOptions), | ||
(RebaseUriOptions rebaseOptions) => new RebaseUriCommand().Run(rebaseOptions), | ||
(ResultMatchingOptions baselineOptions) => new ResultMatchingCommand().Run(baselineOptions), |
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.
ResultMatchingCommand [](start = 63, length = 21)
I didn't set in the alphabetical order because the resultmatching is equal match-results-foward command. #Closed
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.
Would it be worthwhile to rename the file/class to something like "MatchResultOptions" for consistency?
In reply to: 561433654 [](ancestors = 561433654)
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.
Let's do it in another pr, separating what we are doing right now :)
In reply to: 561480791 [](ancestors = 561480791,561433654)
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.
…//github.com/microsoft/sarif-sdk into users/v-jwinkler/#2227_MergeTransformRewrite
…handle any version except 2.
…//github.com/microsoft/sarif-sdk into users/v-jwinkler/#2227_MergeTransformRewrite
…g to V2 first always
@@ -18,11 +18,9 @@ public abstract class CommandBase | |||
|
|||
protected IFileSystem FileSystem { get; set; } | |||
|
|||
public CommandBase(IFileSystem fileSystem = null) |
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.
public CommandBase(IFileSystem fileSystem = null) [](start = 8, length = 49)
don't remove this. For now, this is the way we initialize the FileSytem. If you check, that is used in MultifileCommandBase, calling the FileSystem directly. #Closed
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.
return null; | ||
} | ||
|
||
private void TransformFileToVersionTwo(SingleFileOptionsBase options, string inputVersion, string outputFilePath) |
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.
void [](start = 16, length = 4)
can you return SarifLog instead of void?
in the if, you could return visitor.SarifLog
remove the else and return JsonConvert.... to SarifLog.
With this, we won't need to save in disk #Closed
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.
i would change from options to the sarif string to facilitate, since we won't need to use the options
In reply to: 564740510 [](ancestors = 564740510)
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.
This pull request fixes 1 alert when merging 79ca0bc into d7afbe6 - view on LGTM.com fixed alerts:
|
@@ -43,7 +43,8 @@ private SarifLog ExecuteTest(string path) | |||
{ | |||
InputFilePath = path, | |||
OutputFilePath = path, | |||
Force = true | |||
Force = true, | |||
SarifOutputVersion = SarifVersion.Current |
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.
SarifOutputVersion = SarifVersion.Current [](start = 16, length = 41)
should we add this as default value in the options itself? #Closed
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.
@@ -11,6 +11,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Writers | |||
{ | |||
public class ConsoleLogger : BaseLogger, IAnalysisLogger | |||
{ | |||
// TODO: We directly instantiate this logger in two classes, creating | |||
// unamanged dependencies. Fix this pattern with dependency injection or a factory. |
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.
I don't think we have to worry in this. Since the lifetime of the use is a command, the unmanaged resource will go away when it finishes. #ByDesign
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.
This pull request fixes 1 alert when merging d537617 into d7afbe6 - view on LGTM.com fixed alerts:
|
…ate writes while transforming
This pull request fixes 1 alert when merging 405c18d into d7afbe6 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 74c7c74 into d7afbe6 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 263e636 into d7afbe6 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 4066d45 into d7afbe6 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging f6efc3e into d7afbe6 - view on LGTM.com fixed alerts:
|
src/ReleaseHistory.md
Outdated
@@ -1,5 +1,7 @@ | |||
# SARIF Package Release History (SDK, Driver, Converters, and Multitool) | |||
|
|||
* BREAKING: Move "transform" functionality into "rewrite" and delete redundant "transform" command |
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.
" [](start = 17, length = 1)
change from " to `.
Add the pull request number and link.
Add period in the end #Closed
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.
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.
This pull request fixes 1 alert when merging 01d26b9 into d7afbe6 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 8bf66a5 into 2dd2854 - view on LGTM.com fixed alerts:
|
Fixes #2227
....In preparation for the deletion of transform in its entirety.
Re-order commands alphabetically. Delete unused constructor.