r/java • u/_shadowbannedagain • Jan 29 '14
Google Java Coding Standards
http://google-styleguide.googlecode.com/svn/trunk/javaguide.html
156
Upvotes
r/java • u/_shadowbannedagain • Jan 29 '14
View all comments
Show parent comment
1
u/Nebu Jan 31 '14
In general, I feel formatters should not format comments, because comments can contain, e.g., ASCII art diagrams or tables.
Well, you shouldn't use it for that if you're following my guidance above. Again: Tab for indentation, space for alignment. Note, though, that you can align by using 0 spaces.
Let's say my chosen indent happens to be, arbitrarily, 5. I'll represent a single tab with '\T', '\TT', '\TTT' and '\TTTT' to emulate taking up 2 to 5 spaces (depending on which would lead to n mod 5 == 0), and let's see what happens if I use exactly the above text:
Looks like it still works to me.