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 util.TypeOf helper function #242

Merged
merged 1 commit into from
May 14, 2024
Merged

Remove util.TypeOf helper function #242

merged 1 commit into from
May 14, 2024

Conversation

yuxincs
Copy link
Contributor

@yuxincs yuxincs commented May 14, 2024

This PR simply removes the helper function util.TypeOf. Although it shortens the call from pass.TypesInfo.TypeOf, it increases the cognitive load such that we do not know which we should use in NilAway's codebase and we don't know if util.TypeOf has any special handling (it doesn't!). Moreover, we're using a mixture of these two functionally-identical expressions in our codebase.

Removal of such a helper function reduces confusions and helps maintainability.

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.44%. Comparing base (3062237) to head (310e4b5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #242      +/-   ##
==========================================
- Coverage   87.44%   87.44%   -0.01%     
==========================================
  Files          61       61              
  Lines        7808     7804       -4     
==========================================
- Hits         6828     6824       -4     
  Misses        801      801              
  Partials      179      179              

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

Copy link

Golden Test

Note

✅ NilAway errors reported on standard libraries are identical.

3296 errors on base branch (main, 3062237)
3296 errors on test branch (1b6d0c4)

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.

LGTM!

@yuxincs yuxincs merged commit a25d53b into main May 14, 2024
8 checks passed
@yuxincs yuxincs deleted the yuxincs/remove-type-of branch May 14, 2024 19:04
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