NightWhistler / PageTurner

Android e-book reader with cloud synchronization
pageturner-reader.org
GNU General Public License v3.0
466 stars 222 forks source link

Standardise indentation, closes #573, add style note to README #575

Open projectgus opened 9 years ago

projectgus commented 9 years ago

This was done via macros but it looks OK to me at a once-over, it should be possible to change anything that seems wrong.

Indents are 4 spaces, as requested. All tabs removed.

Multiline argument lists are indented two levels beneath the function definition or call.

Opening braces haven't been moved to the same line as the defining function if they weren't already there. There seem to be relatively few of these anyhow.

For the record, the output of this is emacs' standard java-mode indentation with the following hook set:

; Don't indent argument lists aggressively in Java (add-hook 'java-mode-hook '(lambda () (c-set-offset 'arglist-intro '+) (c-set-offset 'arglist-cont-nonempty '++) ))

... which is hopefully fairly similar to what IntelliJ does.

NightWhistler commented 9 years ago

Just looked through the version in your repo, and it certainly reads a lot cleaner...

I did notice though: it seems to use 8 spaces on the inner classes... check lines 789 - 855 in ReadingFragment to see what I mean... it jumps way to the right. Same thing for lambdas.

I know it sounds a bit nit-picky, but once I merge this it's going to make merging bugfixes from earlier branches next to impossible... so I'd rather get it completely right on the first try.

projectgus commented 9 years ago

Oops, I missed that! Thanks. Nit-picking is absolutely fine, I'd like to get it right as well.

When I get a chance I'll figure out why that wasn't indenting right, and hopefully fix it.