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

Add "funcresult" linter #2526

Closed

Conversation

leonklingele
Copy link
Member

@leonklingele leonklingele commented Jan 27, 2022

@ldez ldez self-requested a review January 27, 2022 22:47
@ldez
Copy link
Member

ldez commented Jan 27, 2022

Hello,

we already have a linter that handles those cases: https://go-critic.com/overview#unnamedresult

@ldez ldez closed this Jan 27, 2022
@ldez ldez added the declined label Jan 27, 2022
@leonklingele
Copy link
Member Author

@ldez it's not the same. The funcresult linter unconditionally enforces the use of either named or unnamed result parameters, while unnamedResult only conditionally decides whether result params should be named.

@ldez
Copy link
Member

ldez commented Jan 27, 2022

For me, it's something that can be added to the existing linter.

@leonklingele
Copy link
Member Author

I've opened go-critic/go-critic#1201. Let's see if I can integrate it to go-critic.

@leonklingele
Copy link
Member Author

seeing that this was only closed due to the use of the require-named option, I've removed support for it from this PR.
@ldez can you please reopen?

@ldez
Copy link
Member

ldez commented Apr 2, 2022

seeing that this was only closed due to the use of the require-named option,

It's not exactly what I say: #2701 (comment)

PR #2701 already provides the feature, so I will not reopen this one.

OSS is about sharing, neither authorship nor ownership, I recommend contributing on the linter added in #2701.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants