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

Enforce Javadoc comment quality #3906

Closed
slarse opened this issue May 4, 2021 · 1 comment · Fixed by #3907
Closed

Enforce Javadoc comment quality #3906

slarse opened this issue May 4, 2021 · 1 comment · Fixed by #3907
Labels

Comments

@slarse
Copy link
Collaborator

slarse commented May 4, 2021

Poking around in the metamodel interfaces, I've noticed that many of them lack proper documentation of parameters and return types.

I think we should enforce that public methods and constructors are properly documented. Checkstyle can do this with the JavadocMethod module. The problem is that it raises ~2600 errors when activated on the public scope alone, so obviously this needs to be introduced gradually. I'm thinking we can add a script that computes a penalty (the amount of errors), and if the penalty increases in relation to the master branch, we break the build. This doesn't entirely guard against poorly documented methods as one could e.g. remove an error from one javadoc and introduce a new one somewhere else, but it's pretty good and pretty easy to implement.

Good docs are important to me, so I'm gonna give this a shot. Decreasing the penalty can then be a great first issue, much like #3854.

@monperrus
Copy link
Collaborator

👍 In Spoon, we love high-quality documentation, esp. in the API.

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 a pull request may close this issue.

2 participants