-
Notifications
You must be signed in to change notification settings - Fork 87
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
Update MSBuild Converter regex to support more MSBuild log variants #2579
Conversation
<None Remove="TestData\MSBuildConverter\ExpectedOutputs\ValidResults.sarif" /> | ||
<None Remove="TestData\MSBuildConverter\Inputs\Empty.ERR" /> | ||
<None Remove="TestData\MSBuildConverter\Inputs\InvalidResult.ERR" /> | ||
<None Remove="TestData\MSBuildConverter\Inputs\ValidResults.ERR" /> | ||
</ItemGroup> |
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.
fyi I remember Michael once had a comment about removing the whole <ItemGroup>
instead, if all of the content is not needed, see if applies here. #Resolved
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.
thanks removed
@@ -83,9 +84,9 @@ private IList<Result> GetResults(TextReader reader) | |||
\s*:\s* | |||
(?<qualifiedLevel> | |||
(?<levelQualification>.*) # For example, 'fatal'. | |||
(?<level>error|warning|note|info|pass|review|open|notapplicable) | |||
(?<level>error|err|warning|wrn|note|info|pass|review|open|notapplicable) |
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.
Don't see a definition of what the level should be in .ERR file. Have seen "Error"/"Warning" also the abbreviation forms "ERR"/"WRN" in build logs. Here just try to match the keyword as much as possible
} | ||
}, | ||
{ | ||
"ruleId": "PV1002", |
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.
bug fixed
For testing the regex: |
src/ReleaseHistory.md
Outdated
@@ -11,6 +11,7 @@ | |||
* BUGFIX: Update `merge` command to properly produce runs by tool and version when passed the `--merge-runs` argument. [#2488](https://github.com/microsoft/sarif-sdk/pull/2488) | |||
* BUGFIX: Eliminate `IOException` and `DirectoryNotFoundException` exceptions thrown by `merge` command when splitting by rule (due to invalid file characters in rule ids). [#2513](https://github.com/microsoft/sarif-sdk/pull/2513) | |||
* BUGFIX: Fix classes inside NotYetAutoGenerated folder missing `virtual` keyword for public methods and properties, by regenerate and manually sync the changes. [#2537](https://github.com/microsoft/sarif-sdk/pull/2537) | |||
* BUGFIX: MSBuild Converter accepts case insensitive keywords and supports PackageValidator msbuild log. [#2579](https://github.com/microsoft/sarif-sdk/pull/2579) |
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.
src/ReleaseHistory.md
Outdated
@@ -11,6 +11,7 @@ | |||
* BUGFIX: Update `merge` command to properly produce runs by tool and version when passed the `--merge-runs` argument. [#2488](https://github.com/microsoft/sarif-sdk/pull/2488) | |||
* BUGFIX: Eliminate `IOException` and `DirectoryNotFoundException` exceptions thrown by `merge` command when splitting by rule (due to invalid file characters in rule ids). [#2513](https://github.com/microsoft/sarif-sdk/pull/2513) | |||
* BUGFIX: Fix classes inside NotYetAutoGenerated folder missing `virtual` keyword for public methods and properties, by regenerate and manually sync the changes. [#2537](https://github.com/microsoft/sarif-sdk/pull/2537) | |||
* BUGFIX: MSBuild Converter accepts case insensitive keywords and supports PackageValidator msbuild log. [#2579](https://github.com/microsoft/sarif-sdk/pull/2579) |
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.
thanks for the suggestion. updated.
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.
Description
The information regarding MSBuild log format https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-diagnostic-format-for-tasks?view=vs-2022