hyperspace icon indicating copy to clipboard operation
hyperspace copied to clipboard

Scaladoc consistency

Open clee704 opened this issue 4 years ago • 3 comments

Forked from #399. Maybe a super nit issue 😉

I'm okay with any options, but they should be applied consistently.

Identified inconsistencies during the review:

  • Starting a description for a @param or @return with uppercase or lowercase
  • Putting a period after a description for a @param or @return
  • Duplicating Scaladoc comments for overriding methods

Here're my thoughts:

  • Either uppercase or lowercase is fine. Since uppercase is more prevalent in our code, let's go with uppercase.
  • Put a period after a proper sentence, or after a phrase if it is followed by another phrase or sentence. No period after a phrase if it ends the description.
  • Don't duplicate if the content is identical and there is no new information. Duplicating a part of the content with new information for the specific implementation is allowed.

clee704 avatar Apr 07 '21 14:04 clee704

Thanks for initiating this issue! I'm good with those suggestions. :)

sezruby avatar Apr 07 '21 22:04 sezruby

I'm good with it. One step further is to implement the rules above in scalafmt checker but I don't know if that is possible.

andrei-ionescu avatar Apr 08 '21 07:04 andrei-ionescu

I'm good with it. One step further is to implement the rules above in scalafmt checker but I don't know if that is possible.

It seems you can't, although you can specify the overall look and style of the Scaladoc comments.

clee704 avatar Apr 08 '21 13:04 clee704