-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add .editorconfig #633
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 #633
Conversation
IntlliJ IDEA support: https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig JAVA-3922
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.
Should we prune this file to contain config for only the file formats that we actually use?
…n't have in the repo JAVA-3922
Done. All other sections contain at least one file extension that we have in the repo. |
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.
Still looks like there are some unnecessary file formats.
.editorconfig
Outdated
ij_visual_guides = none | ||
ij_wrap_on_typing = true | ||
|
||
[*.css] |
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.
Let's remove this one too as we never edit the css files.
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.
We also have *.js
files, and we probably don't edit them. I will remove front-end related file extensions, even if we have such files in the repo.
.editorconfig
Outdated
ij_java_wrap_first_method_in_call_chain = false | ||
ij_java_wrap_long_lines = false | ||
|
||
[*.less] |
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.
What are .less files?
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.
I don't know what are they, but here is an example: https://github.com/mongodb/mongo-java-driver/blob/master/docs/landing/static/s/lib/font-awesome/less/list.less
.editorconfig
Outdated
ij_less_use_double_quotes = true | ||
ij_less_value_alignment = 0 | ||
|
||
[*.sass] |
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.
What are .sass files?
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.
This is my fault 👎 , I missed the section. The same is true for the *.styl
section.
.editorconfig
Outdated
ij_scala_wrap_first_method_in_call_chain = false | ||
ij_scala_wrap_long_lines = false | ||
|
||
[*.scss] |
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.
What are .scss files?
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.
.editorconfig
Outdated
ij_scss_use_double_quotes = true | ||
ij_scss_value_alignment = 0 | ||
|
||
[*.styl] |
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.
What are .styl files?
For the HTML-related files, we almost never edit them, and will soon be removing the reference docs from the repository entirely. So not sure if it's worth including edit configs for anything in the reference/landing docs. What do you think, @rozza |
I removed front-end related sections. Jeff, thanks for spotting the redundant |
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.
LGTM
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.
LGTM
I've changed now use the default intellij styles and a diff doesn't show much difference - so happy with it.
@@ -0,0 +1,716 @@ | |||
[*] |
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.
One suggestion add:
root = true
to the start of the file.
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.
Thanks 👍 , done.
This way tools won't look all the way up to the root path to find all the applicable configs. JAVA-3922
IntlliJ IDEA support: https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig JAVA-3922
This reverts commit 4f750b8.
IntlliJ IDEA support: https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig
JAVA-3922