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

Add .editorconfig for formatting #1517

Merged
merged 1 commit into from Apr 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
@@ -0,0 +1,14 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.java]
indent_size = 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs for java ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far I think we've been using 4 spaces mainly in Java even if currently we have a mix. I would prefer spaces for all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I have a preference for spaces ; FYI, it seems that google in its guidelines goes this way (https://google.github.io/styleguide/javaguide.html#s2.3.1-whitespace-characters), but the default eclipse (which might follow oracle official guidelines) uses tabs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guideline also use 2 spaces only (https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation) maybe that's better too ?


[*.md]
indent_size = 2
trim_trailing_whitespace = false