-
Notifications
You must be signed in to change notification settings - Fork 796
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
Tweak MetaData Report format for better readability #5929
base: main
Are you sure you want to change the base?
Conversation
…ws and linux in tests
…/extensions into audit-report-format
the checks failed because of something related to hybrid caching |
src/Generators/Microsoft.Gen.MetadataExtractor/MetadataReportsGenerator.cs
Outdated
Show resolved
Hide resolved
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=956346&view=codecoverage-tab |
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=957466&view=codecoverage-tab |
Could you please also bump this threshold? |
src/Generators/Microsoft.Gen.MetadataExtractor/MetadataReportsGenerator.cs
Outdated
Show resolved
Hide resolved
src/Generators/Microsoft.Gen.MetadataExtractor/MetadataReportsGenerator.cs
Outdated
Show resolved
Hide resolved
src/Generators/Microsoft.Gen.MetricsReports/MetricsReportsGenerator.cs
Outdated
Show resolved
Hide resolved
test/Generators/Microsoft.Gen.MetadataExtractor/Unit/GeneratorTests.cs
Outdated
Show resolved
Hide resolved
test/Generators/Microsoft.Gen.MetadataExtractor/Unit/GeneratorTests.cs
Outdated
Show resolved
Hide resolved
@RussKie Thank you for your valuable feedback, I will fix them ASAP , regarding the changing the order of parameters and naming ,I tried to make them consistent with compliance. now all of the are consistent , I could change the three of them if you'd like. I'll work on the other notes in the meantime |
-fix spaces -fix documentation
…/extensions into audit-report-format
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=957592&view=codecoverage-tab |
I have excluded JsonEmitter from projects that does not use it, which led the WarningCheks to succussed. |
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.
It seems the formatting still has inconsistencies, can we fix that?
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 you please provide me your thoughts on the justifications bellow ?
if you have any further insights please share them with me
[ | ||
{ | ||
"TestClasses": | ||
[ |
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.
For example here, arrays should start the bracket on the same line as the property, and containing objects indented only one level
"MetricReport": | |
[ | |
{ | |
"TestClasses": | |
[ | |
"MetricReport": [ | |
{ | |
"TestClasses": [ |
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.
the reason for this is that all the generators start with an empty line.
the MetaDataGenerator
utilizes the MetricsReportsGenerator
which will start with a empty line by default.
if you look at ComplianceReports
it will be the same.
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 can for example introduce a new flag to decide whither to keep the newline or not
{ | ||
"Dimension1": "Dimension1 description." | ||
} |
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.
And here it has an extra indentation, and doesn't follow usual JSON formatting for object properties
"Dimensions": | |
{ | |
"Dimension1": "Dimension1 description." | |
} | |
"Dimensions": { | |
"Dimension1": "Dimension1 description." | |
} |
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 have removed the indentations. However putting the open brace up above will require me to change also on Compliance because every json object is opened on a separated line.
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.
do you mind changing the compliance ? it remained untouched
is there anything further needs to be done ? |
This pull request only tackle the generated metadata format putting different proprieties on new Lines
Tests were failing due to the differences between escapes in Windows and Linux ,
at the
GeneratorTests
class in the namespaceMicrosoft.Gen.MetadataExtractor.Unit.Tests;
.I introduced new method called
NormalizeEscapes
, which will only escape"\r\n"
to neglect the gap betweenWindows & Linux, I hope this addition is acceptable.
Before :

After :

the test report has been changed to be aligned with the new formatting.
here are the unit tests :
Microsoft Reviewers: Open in CodeFlow