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

Conversation

@fxprunayre
Copy link
Member

fxprunayre commented Apr 1, 2016

Most of IDE are supporting this .editorconfig file (http://editorconfig.org/). It does not modify existing files (unless we use reformat code action or some autoformat options are enabled) and only applies to new files.

@fgravin

This comment has been minimized.

Copy link
Member

fgravin commented Apr 4, 2016

Very good idea.
I think code rules should appear somewhere in the doc (contributing section).

Also it is very important to follow this rules, cause we often have merge conflict issues just caused by formatting, what is a pain.

insert_final_newline = true

[*.java]
indent_size = 4

This comment has been minimized.

Copy link
@fgravin

fgravin Apr 4, 2016

Member

tabs for java ?

This comment has been minimized.

Copy link
@fxprunayre

fxprunayre Apr 4, 2016

Author Member

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.

This comment has been minimized.

Copy link
@pmauduit

pmauduit Apr 4, 2016

Contributor

+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.

This comment has been minimized.

Copy link
@fxprunayre

fxprunayre Apr 4, 2016

Author Member

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

@fgravin

This comment has been minimized.

Copy link
Member

fgravin commented Apr 4, 2016

+1

@fxprunayre fxprunayre merged commit b78bd53 into geonetwork:develop Apr 11, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@fxprunayre fxprunayre self-assigned this Apr 11, 2016
fxprunayre added a commit to titellus/core-geonetwork that referenced this pull request Apr 18, 2016
@fxprunayre fxprunayre mentioned this pull request Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.