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

fix(file_handler): avoid writing extra newline character #2335

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Mar 31, 2024

Description

When developing unit tests in #1603, it was discovered that the read_file function would add an extra newline character.

Todo:

  • parametrize test to cover more cases

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch from 4d5b01b to 324e193 Compare March 31, 2024 00:26
Copy link

codecov bot commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.00%. Comparing base (6674090) to head (4cf10c8).

Additional details and impacted files
@@            Coverage Diff             @@
##           nightly   #2335      +/-   ##
==========================================
- Coverage     7.02%   7.00%   -0.03%     
==========================================
  Files           87      87              
  Lines        17675   17670       -5     
  Branches      8395    8391       -4     
==========================================
- Hits          1242    1237       -5     
- Misses       13709   13739      +30     
+ Partials      2724    2694      -30     
Flag Coverage Δ
Linux 5.35% <100.00%> (-0.02%) ⬇️
Windows 2.56% <100.00%> (-0.05%) ⬇️
macOS-12 7.99% <0.00%> (-0.04%) ⬇️
macOS-13 7.90% <0.00%> (-0.04%) ⬇️
macOS-14 8.25% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/file_handler.cpp 78.57% <100.00%> (-5.64%) ⬇️

... and 23 files with indirect coverage changes

@ReenigneArcher ReenigneArcher marked this pull request as draft April 1, 2024 19:18
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch from 324e193 to 52b60b6 Compare April 1, 2024 19:32
@ReenigneArcher ReenigneArcher marked this pull request as ready for review April 1, 2024 19:32
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch 2 times, most recently from 8b55c30 to 053dd1d Compare April 1, 2024 19:51
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch 2 times, most recently from 9aa79e1 to dedd533 Compare April 4, 2024 21:53
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch 2 times, most recently from cf436f4 to b97f07c Compare April 12, 2024 13:21
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch 7 times, most recently from 5bc220e to f97414f Compare April 21, 2024 12:48
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch 2 times, most recently from cc32a8e to 05cab1c Compare May 12, 2024 12:56
@ReenigneArcher ReenigneArcher force-pushed the fix(file_handler)-avoid-writing-extra-newline-character branch from 05cab1c to 4cf10c8 Compare May 12, 2024 16:26
@ReenigneArcher ReenigneArcher merged commit 659a426 into nightly May 12, 2024
51 of 53 checks passed
@ReenigneArcher ReenigneArcher deleted the fix(file_handler)-avoid-writing-extra-newline-character branch May 12, 2024 17:13
@Hazer Hazer mentioned this pull request May 30, 2024
11 tasks
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant