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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

projectgus
Copy link
Contributor

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.

…README

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
Copy link
Owner

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants