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

Warn when preserve is set, but the original value would be overwritten #14

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

camdencheek
Copy link
Contributor

Description of Changes

When preserve is set, users expect the original value to be available after parsing. However, in some cases, writing the results of our parse step will overwrite the original value. An example is when we are parsing from root, and writing the parsed fields to the root level. In these cases, this PR adds a warning message that briefly explains the situation.

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Add a changelog entry (for non-trivial bug fixes / features)
  • CI passes

@camdencheek camdencheek requested a review from jmwilliams89 July 9, 2020 15:39
@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #14 into master will decrease coverage by 0.13%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   75.73%   75.60%   -0.13%     
==========================================
  Files          61       61              
  Lines        3593     3599       +6     
==========================================
  Hits         2721     2721              
- Misses        649      654       +5     
- Partials      223      224       +1     
Impacted Files Coverage Δ
plugin/helper/parser.go 85.71% <0.00%> (-10.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32d21f6...24e6d8c. Read the comment docs.

@camdencheek camdencheek force-pushed the warn-on-preserve-overwritten branch from 8406afa to 2183b9a Compare July 10, 2020 15:07
@camdencheek camdencheek force-pushed the warn-on-preserve-overwritten branch from 2183b9a to 24e6d8c Compare July 10, 2020 15:07
@camdencheek camdencheek merged commit 7a9fd6f into master Jul 10, 2020
@camdencheek camdencheek deleted the warn-on-preserve-overwritten branch July 10, 2020 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants