-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Introduced Formatter in libzim #862
Conversation
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 PR.
Few things to change.
I'm in favor of using it in archive.cpp
and debug.h
too.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #862 +/- ##
==========================================
+ Coverage 57.73% 58.04% +0.30%
==========================================
Files 100 101 +1
Lines 4619 4617 -2
Branches 1936 1921 -15
==========================================
+ Hits 2667 2680 +13
+ Misses 672 667 -5
+ Partials 1280 1270 -10 ☔ View full report in Codecov by Sentry. |
I am a little against using it in test/archive. The |
Also, I think we should place the class in include/zim/tools.h. After installation, error.h would not be able to use this class. |
Resolved most of the comments and moved to zim/tools.h to ensure installation is correct. Likely need another patch depending on the discussion of std::endl vs '\n' and archive.cpp |
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.
Still a small change to do about closing "
.
I agree with the global code but please rework the commits. Once this PR will be merged, we will not care about the small mistake made during development and fixed during review. We are more interested with a clean git history.
I would suggest 3 commits (but feel free to assume your own pov on this) :
- Fix closing
"
. - Introduce
Formatter
. - Use formater
Fixed the compilation issue with __ostream_type from different platforms. @mgautierfr Can you run the CI again? |
I am new to codecov. I believe I should just add test cases in the test folder that hit those code changes right? This might take a while... |
Should we ignore the codecov atm? So these changes were not part of the covered sections. If we see the sentry report from other PRs, the exact sections are shown as missed. I do not think I have enough knowledge on how to reproduce all these error edge cases. @mgautierfr @kelson42 |
Yes, the formater is used a lot to generate error message. Difficult to fully test. |
Code extended from: openzim/zim-tools#158 Fix openzim#432
Replaced uses of (o)stringstreams in src that does not need stringstream methods. Carry along change adding a missing quotation in file_compound.cpp. Fix openzim#432
Hi! I am a GSOC student this year and its my first PR here.
Changes:
Discussion needed:
Fixes #432