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

Remove ErrorOnNilableMap handling #243

Merged
merged 2 commits into from
May 14, 2024

Conversation

yuxincs
Copy link
Contributor

@yuxincs yuxincs commented May 14, 2024

Reading from a nil map does not really panic and is actually used quite frequently in Go. When NilAway was initially developed we added a feature that errs when a nilable map is accessed, and guard it under an internal feature flag for us to see more data points. Now that NilAway is more mature and we have seen more real world examples, this PR removes such handling and the stale feature flag.

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.50%. Comparing base (a25d53b) to head (fcf4c78).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   87.44%   87.50%   +0.06%     
==========================================
  Files          61       61              
  Lines        7804     7798       -6     
==========================================
  Hits         6824     6824              
+ Misses        801      796       -5     
+ Partials      179      178       -1     

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

Copy link

github-actions bot commented May 14, 2024

Golden Test

Note

✅ NilAway errors reported on standard libraries are identical.

3296 errors on base branch (main, a25d53b)
3296 errors on test branch (dc5eb34)

Copy link
Contributor

@sonalmahajan15 sonalmahajan15 left a comment

Choose a reason for hiding this comment

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

Agree with the cleanup!

@yuxincs yuxincs merged commit fe712a8 into main May 14, 2024
8 checks passed
@yuxincs yuxincs deleted the yuxincs/remove-error-on-nilable-map-read branch May 14, 2024 19:15
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.

None yet

2 participants