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

Missing Line and Column Information in model.ChangeContext for Enum Changes fix #232

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

Amitrei
Copy link
Contributor

@Amitrei Amitrei commented Jan 11, 2024

A fix for issue #231

I have addressed the issue by implementing a simple fix: removing the encoding from the toString function. However, it became apparent that this alone was insufficient. The toString function is crucial when storing the node.Yaml enum object string value as a key in a map, which is used for comparison between the right and left sides.

To mitigate this issue, I have modified the toString function to return the encoded string without including the column and line information. To prevent the loss of the original object's line and column data, I have utilized a copy of the object. This ensures that the comparison is not adversely affected by the line and column information, while still preserving the integrity of the original object's data.

…sed) object, added schema tests for model.ChangeContext line and column on enum changes.
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d7c6474) 99.62% compared to head (e786402) 99.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   99.62%   99.60%   -0.02%     
==========================================
  Files         160      160              
  Lines       11880    11882       +2     
==========================================
  Hits        11835    11835              
- Misses         45       47       +2     
Flag Coverage Δ
unittests 99.60% <100.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for your contribution.

@daveshanley
Copy link
Member

The code coverage issue is a glitch with codecov, all code is covered.

@daveshanley daveshanley merged commit 2a1e4e5 into pb33f:main Jan 11, 2024
2 of 3 checks passed
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