Skip to content
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

Flowing suppression to baseline #2390

Merged
merged 4 commits into from
Oct 8, 2021

Conversation

eddynaka
Copy link
Collaborator

@eddynaka eddynaka commented Oct 4, 2021

No description provided.


SarifLog currentSarifLog = PrereleaseCompatibilityTransformer.UpdateToCurrentVersion(fileSystem.FileReadAllText(options.OutputFilePath),
options.Formatting,
out string _);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will enable us to accept any version.

@@ -3,11 +3,8 @@

namespace Microsoft.CodeAnalysis.Sarif.Driver
{
public abstract class DriverCommand<T>
public abstract class DriverCommand<T> : CommandBase
Copy link
Collaborator Author

@eddynaka eddynaka Oct 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CommandBase

with this, we can re-use some methods from the CommandBase class

if (PreviousResult.Result.Suppressions != null && CurrentResult.Result.Suppressions == null)
{
result.Suppressions = PreviousResult.Result.Suppressions;
}
Copy link
Collaborator Author

@eddynaka eddynaka Oct 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will flow suppressions from the baseline file to the current file. #Resolved

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so here we don't consider current file's suppression?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we start from the current, we just have to compare previous with current. if previous exist and current does not, we should replace.
otherwise, we will keep the current :)

Copy link
Collaborator

@shaopeng-gh shaopeng-gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Collaborator

@yongyan-gh yongyan-gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@eddynaka eddynaka merged commit 4dc41fe into main Oct 8, 2021
@eddynaka eddynaka deleted the users/ednakamu/suppression-should-flow-to-baseline branch October 8, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants