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

Code indenting #573

Open
projectgus opened this issue Feb 3, 2015 · 1 comment
Open

Code indenting #573

projectgus opened this issue Feb 3, 2015 · 1 comment
Assignees

Comments

@projectgus
Copy link
Contributor

This is a really minor thing, but I noticed the code indenting is inconsistent in various parts of the PageTurner codebase. I may be one of the worst offenders, I think the code I contributed for Nook support is all indented differently to the rest of PageTurner!

Is there a canonical indentation style that you'd like used? I'd be happy to submit a PR which standardises indentation, if that's of any assistance.

@NightWhistler
Copy link
Owner

I generally just let IntelliJ take care of the indenting, but I do have a few rules I try to keep:

  • Use 4 spaces for indenting, no tabs
  • Opening brackets on the end of the line (basically the Java standard)

@NightWhistler NightWhistler reopened this Feb 4, 2015
projectgus added a commit to projectgus/PageTurner that referenced this issue Feb 21, 2015
…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 NightWhistler self-assigned this Feb 24, 2015
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

No branches or pull requests

2 participants