-
Notifications
You must be signed in to change notification settings - Fork 16
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 checker for different usage of type in func arguments #31
base: master
Are you sure you want to change the base?
Conversation
If @quasilyte is ok with this addition I'll update readme as well. |
@cristaloleg maybe @a-urth wants to have an opportunity to change combined types into separate definitions. Some programmers dislike @a-urth, is that so? I need some time to think about it and ask others about their opinion. |
Yes, but it suggest one way of doing it while |
@quasilyte exactly. We have this discussion in our project and want to stick to the way which is already mostly used. Me personally on the side of combining types, which I found to be idiomatic in |
The argument I've got from several sources:
The bad part is that this preference allows both forms to co-exist in one codebase. |
I still think that implementing this as a check for lintpack is more useful as it can have more options. I can help you porting that check, if you have any questions, there is https://t.me/go_critic_eng and https://t.me/go_critic_ru (depending on the language you prefer). The problem with go-consistent is that it works sub-optimal when both alternative may be desired to live inside a single project. I don't know how to approach that yet. |
Add checker consistent usage of types in function declarations
vs