-
Notifications
You must be signed in to change notification settings - Fork 8
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
refactor: Break up HeaderSectionWriter #499
base: main
Are you sure you want to change the base?
Conversation
As time when by the HeaderSectionWriter is now home for many warnings and details to the users, and more are on the way. This SectionWriter has a huge entrypoint function and it's hard to figure out the ordering of the different lines. Also with the ability to hide project coverage it had more than 1 return value, however there are messages that need to be written in both branches. The changes in this commit attemp to unify the 2 branches of the HeaderSectionWriter, and breaks it up further into HeaderPieces, with a function (or 2 😅) per HeaderPiece. The objective is to make it easier to figure out the order of lines in the header. AND to make it easier to change specific HeaderPieces and add more HeaderPieces.
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 97.26% 97.26%
=======================================
Files 412 412
Lines 34424 34449 +25
=======================================
+ Hits 33481 33506 +25
Misses 943 943
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 97.26% 97.26%
=======================================
Files 412 412
Lines 34424 34449 +25
=======================================
+ Hits 33481 33506 +25
Misses 943 943
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 97.26% 97.26%
=======================================
Files 412 412
Lines 34424 34449 +25
=======================================
+ Hits 33481 33506 +25
Misses 943 943
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 97.28% 97.29%
=======================================
Files 443 443
Lines 35153 35178 +25
=======================================
+ Hits 34200 34225 +25
Misses 953 953
Flags with carried forward coverage won't be shown. Click here to find out more.
|
As time when by the HeaderSectionWriter is now home for many warnings and details to the users,
and more are on the way.
This SectionWriter has a huge entrypoint function and it's hard to figure out the ordering of the
different lines. Also with the ability to hide project coverage it had more than 1 return value,
however there are messages that need to be written in both branches.
The changes in this commit attemp to unify the 2 branches of the HeaderSectionWriter, and breaks it up
further into HeaderPieces, with a function (or 2 😅) per HeaderPiece.
The objective is to make it easier to figure out the order of lines in the header.
AND to make it easier to change specific HeaderPieces and add more HeaderPieces.
[edit] Why am I doing this, you ask? Because I need to add yet another message to this section: codecov/engineering-team#1622
and I felt bad to add more to the mess... but maybe it would be better to not put the extra message in the Header section after all.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.