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

Delete unused String() methods #156

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

sonalmahajan15
Copy link
Contributor

This PR performs code cleanup by deleting unused String() methods.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b83875) 89.01% compared to head (f5ac200) 89.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
+ Coverage   89.01%   89.38%   +0.37%     
==========================================
  Files          55       55              
  Lines        9176     9138      -38     
==========================================
  Hits         8168     8168              
+ Misses        841      803      -38     
  Partials      167      167              

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

Copy link
Contributor

@yuxincs yuxincs left a comment

Choose a reason for hiding this comment

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

Dead code removal, LGTM :) I only have one question on MinimalString :)

@@ -137,11 +130,6 @@ func (r *okRead) effectIfFalse(*RootAssertionNode) {

func (*okRead) isNoop() bool { return false }

func (r *okRead) String() string {
return fmt.Sprintf("<okRead: {value: %s, ok: %s}>",
r.value.MinimalString(), r.ok.MinimalString())
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: Are we still using MinimalString?

@sonalmahajan15 sonalmahajan15 force-pushed the sonalmahajan15/delete-string branch from 78686b5 to f5ac200 Compare January 26, 2024 23:16
@sonalmahajan15 sonalmahajan15 merged commit 6b41ff0 into main Jan 26, 2024
5 checks passed
@sonalmahajan15 sonalmahajan15 deleted the sonalmahajan15/delete-string branch January 26, 2024 23:21
sonalmahajan15 added a commit that referenced this pull request Feb 8, 2024
This pull request introduces support for the `ok` form in both
user-defined and library functions and methods. The implementation
addresses false positives, such as those identified in issue #77.

Currently, the feature is designed to handle explicit boolean returns,
specifically in the form of `return r0, r1, ..., true`. Support for
expression-based returns (e.g., `return r0, r1, ..., flag` or `return
r0, r1, ..., isOk()`) is tricky, as tracking boolean types is currently
not supported in NilAway. We can handle this scenario in the future.

[Closes #77 ]
[Depends on #156 ]
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