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

@fxprunayre fxprunayre added this to the 3.1.0 milestone Apr 1, 2016
@fgravin
Copy link
Member

@fgravin 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
Copy link
Member

@fgravin fgravin Apr 4, 2016

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

@fxprunayre fxprunayre Apr 4, 2016

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

@pmauduit pmauduit Apr 4, 2016

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

@fxprunayre fxprunayre Apr 4, 2016

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 ?

@fgravin
Copy link
Member

@fgravin fgravin commented Apr 4, 2016

+1

@fxprunayre fxprunayre merged commit b78bd53 into geonetwork:develop Apr 11, 2016
1 check passed
@fxprunayre fxprunayre self-assigned this Apr 11, 2016
fxprunayre pushed a commit to titellus/core-geonetwork that referenced this issue 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants