Skip to content

Comments

Add editorconfig for a degree of IDE formatting consistency#588

Merged
rnorth merged 2 commits intomasterfrom
editorconfig
Feb 25, 2018
Merged

Add editorconfig for a degree of IDE formatting consistency#588
rnorth merged 2 commits intomasterfrom
editorconfig

Conversation

@rnorth
Copy link
Member

@rnorth rnorth commented Feb 24, 2018

This is intended to start moving us towards more consistent code formatting.

It will hopefully help make new contributions' formatting be more consistent. This PR doesn't include a bulk reformatting of the codebase, as that would probably be more pain for PR authors that they don't need right now.

WDYT?

@rnorth rnorth requested review from bsideup and kiview February 24, 2018 20:02
root = true

# Unix-style newlines with a newline ending every file
[*]
Copy link
Member Author

Choose a reason for hiding this comment

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

Tempted to leave this as just *.java - thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I checked a few other projects, they seem to use [*]

Also, I recommend adding:

[*.md]
trim_trailing_whitespace = false

Because in Markdown there is (two trailing spaces) to break the line

Copy link
Member

Choose a reason for hiding this comment

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

Plus trim_trailing_whitespace = true to [*]

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, will do. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

I think it's good to have lf for all files, especially bash files, to make life easier for Windows development (currently we've solved this with the .gitattributes). And this might also help us in achieving remote caching for Windows builds for local development (not for CI though?).

Copy link
Member

Choose a reason for hiding this comment

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

Hm no, it doesn't help with Windows cache, since it's only applied for edited files? But it's fine, we can solve it another way some day ;)

@bsideup bsideup added this to the next milestone Feb 24, 2018
root = true

# Unix-style newlines with a newline ending every file
[*]
Copy link
Member

Choose a reason for hiding this comment

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

I think it's good to have lf for all files, especially bash files, to make life easier for Windows development (currently we've solved this with the .gitattributes). And this might also help us in achieving remote caching for Windows builds for local development (not for CI though?).

root = true

# Unix-style newlines with a newline ending every file
[*]
Copy link
Member

Choose a reason for hiding this comment

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

Hm no, it doesn't help with Windows cache, since it's only applied for edited files? But it's fine, we can solve it another way some day ;)

@rnorth rnorth merged commit 242605a into master Feb 25, 2018
@rnorth rnorth deleted the editorconfig branch February 25, 2018 19:42
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.

3 participants