-
Notifications
You must be signed in to change notification settings - Fork 441
feat(lint): add render function lint signature #4943
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
base: master
Are you sure you want to change the base?
feat(lint): add render function lint signature #4943
Conversation
🛠 PR Checks Summary🔴 Pending initial approval by a review team member, or review from tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
|
||
| // Invalid 'Render' function: wrong parameter (int instead of string) | ||
|
|
||
| func Render(input int) string { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
i already have a test that try the number of parameter, i don't think its relevant to add this test.
gnovm/cmd/gno/lint.go
Outdated
| } | ||
|
|
||
| switch { | ||
| case !isSingleString(s.Params()), !isSingleString(s.Results()): |
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.
I get why using a switch case, but since we only have one case I think a if would be more adapted
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.
| return nil | ||
| } | ||
|
|
||
| o := pkg.Scope().Lookup("Render") |
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.
Tests don't pass due to lint applying on every package (pure package + realm) instead of only realm.
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.
…o into mikael/fix/render-func
fix #4026
80% work based on this PR: #4083
I let a message to ask to take over the PR & the PR was stale so i decided to update it.