ucsb-cs56-projects / cs56-games-fish-animation

-
1 stars 11 forks source link

Javadoc Comment Cleanup #78

Closed xavierholt closed 6 years ago

xavierholt commented 6 years ago

My editor thinks that Javadocs with no leading asterisk should be bright pink. My eyes hurt. Please help.

50 XP

screen shot 2017-10-01 at 6 42 54 pm
9728627 commented 6 years ago

I wanted to fix the bug and serached the Internet. I think you should change the color scheme. The color of the comments depends on your editor. So i do not think I fix it on my side. Is it one kind of solution to the error here?

xavierholt commented 6 years ago

Convention is to use the leading asterisks, and leaving them out does obviously make some editors complain. There's also a slight difference in how code without them is interpreted. From the docs:

When javadoc parses a doc comment, leading asterisk (*) characters on each line are discarded; blanks and tabs preceding the initial asterisk (*) characters are also discarded. Starting with 1.4, if you omit the leading asterisk on a line, the leading white space is no longer removed. This enables you to paste code examples directly into a doc comment inside a <PRE> tag, and its indentation will be honored. Spaces are generally interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator /** or <PRE> tag).

So I'd fix it. But if you don't want the points, don't fix it.

aryamandas commented 6 years ago

W18 OK (50 points)

xstephenhu98 commented 6 years ago

Fixed #78 - more leading asterisks and no more pink!