Replies: 1 comment 2 replies
-
The decision not to include that check wasn't based on code one never intents to share. It was based on the fact that not all public API needs to be documented, even in a public, well-documented project. The most obvious examples are the Not all things can be enforced well by tools, and I hold the belief that this check is one that should be done by fellow humans during code review. |
Beta Was this translation helpful? Give feedback.
-
I switched from golint to staticcheck and noticed that
... should have comment or be unexported
is not reported. Not that I am particularly good at documenting (being non-native English speaker it is even harder) but it felt off not being required to document public functions/methods. it is that same feeling that bothers me when me do not write tests - I feel guilty.So I started to search what would be the reasoning for not having that check and found #542 I do understand that commenting stuff that you never indent to share with other is annoying and most of the time unnecessary but for public libraries/APIs this argument is maybe in somewhat on bar with argumentation why not to write tests. Having optional checks that nudge people in positive direction, to think about and write documentation (for public stuff), would be nice to have.
This is not a demand, in my mind I am trying to argue for that idea and not make demands. Please do not take it in that way. Please consider adding check like that in future.
Beta Was this translation helpful? Give feedback.
All reactions