-
-
Notifications
You must be signed in to change notification settings - Fork 137
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 panic when parsing unattached comment #565
Conversation
The parser panics when there's a comment without anything to attach it to. This PR fixes that case. Signed-off-by: Charith Ellawala <charith@cerbos.dev>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
=======================================
Coverage 77.45% 77.46%
=======================================
Files 21 21
Lines 7479 7482 +3
=======================================
+ Hits 5793 5796 +3
Misses 1291 1291
Partials 395 395 |
Requires patch from goccy/go-yaml#565. Fixes cerbos#2401 Signed-off-by: Charith Ellawala <charith@cerbos.dev>
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.
Thank you for your contribution ! I've submitted review
Signed-off-by: Charith Ellawala <charith@cerbos.dev>
Signed-off-by: Charith Ellawala <charith@cerbos.dev>
Requires patch from goccy/go-yaml#565. Fixes #2401 Signed-off-by: Charith Ellawala <charith@cerbos.dev> --------- Signed-off-by: Charith Ellawala <charith@cerbos.dev>
After the parser refactor, there's a panic when a comment exists on its own without anything to attach it to. This PR fixes that case.
Before submitting your PR, please confirm the following.