Skip to content

Make sure exported methods and types are documented by godoc in lint rules #3666

@zyfy29

Description

@zyfy29

Here says,

Every exported method needs to have code comments that follow
[Go Doc Comments][]. A typical method's comments will look like this:

Maybe there should mention exported types as well. And it could be guaranteed by a lint rule.

I find that revive could do it, which is already enabled in this project so no new dependence will be introduced. I just checked it in my local environment and there are up to 20+ methods and types missing godoc comments.

I just want to check that if exported Vars and Consts need to be documented.

And, if you think it's a good idea, I could be of some help to implement it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions