-
Notifications
You must be signed in to change notification settings - Fork 293
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
.editorconfig and .gitattributes to centralize formatting #3766
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# EditorConfig: http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.gradle] | ||
indent_size = 2 | ||
|
||
[*.groovy] | ||
indent_size = 4 | ||
|
||
[*.java] | ||
indent_size = 4 | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[*.sh] | ||
indent_size = 2 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.{xsd,xml}] | ||
indent_size = 4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Java sources | ||
*.java text diff=java | ||
*.kt text diff=kotlin | ||
*.groovy text diff=java | ||
*.scala text diff=java | ||
*.gradle text diff=java | ||
*.gradle.kts text diff=kotlin | ||
|
||
# These files are text and should be normalized (Convert crlf => lf) | ||
*.css text diff=css | ||
*.scss text diff=css | ||
*.sass text | ||
*.df text | ||
*.htm text diff=html | ||
*.html text diff=html | ||
*.js text | ||
*.jsp text | ||
*.jspf text | ||
*.jspx text | ||
*.properties text | ||
*.tld text | ||
*.tag text | ||
*.tagx text | ||
*.xml text | ||
|
||
# These files are binary and should be left untouched | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you expect any such binary files to ever be checked into the repository? if not i'd leave them away |
||
# (binary is a macro for -text -diff) | ||
*.class binary | ||
*.dll binary | ||
*.ear binary | ||
*.jar binary | ||
*.so binary | ||
*.war binary | ||
*.jks binary | ||
|
||
# Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is |
||
mvnw text eol=lf | ||
gradlew text eol=lf | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: new line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't you also have an entry to flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these settings actually needed? i'd have expected them to be the default (
text
and the correctdiff
setting for these common languages). i certainly never had the need to specify them