-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Add .editorconfig
to maintain consistent coding styles
#1517
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
Conversation
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.
Thank you, @ijliym !
I have added a few comments.
As I'm not familiar with the file, please let me know if there is anything you want to discuss. :)
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf |
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 not add end_of_line
. We have text=auto
in .gitattributes
.
@@ -0,0 +1,12 @@ | |||
root = true | |||
|
|||
[*.{adoc, bat, groovy, html, java, js, jsp, kt, kts, md, properties, py, rb, sh, sql, svg, txt, vm, xml, xsd}] |
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.
[*.{java, xml, sql}]
should be enough for our repo.
[*.{adoc, bat, groovy, html, java, js, jsp, kt, kts, md, properties, py, rb, sh, sql, svg, txt, vm, xml, xsd}] | ||
charset = utf-8 | ||
|
||
[*.{groovy, java, kt, kts, vm, xml, xsd}] |
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.
Same as above. [*.{java, xml, sql}]
should be enough.
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 agree with you! I just referred to Spring's .editorconfig
file. It can be adjusted here. Thank you!
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.
Hi @ijliym I cannot edit the files. Maybe because you deleted the branch?
I'm not sure if it works, but can you restore the fork/branch?
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'm very sorry, I don't know after delete this, there will be an impact. I've added it again now, but I don't think it might work. If it doesn't work, please trouble you add it yourself. I just want to have a .editorconfig
file in the project, not necessarily if I add it.
Sorry again!
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.
GitHub does not recognize the new branch, but no worries.
Although it's a little bit irregular, I'll make the changes after merge. :)
Thanks for the contribution!
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.
You're welcome.
Changes requested on mybatis/mybatis-3#1517
* master: (616 commits) Fix trivial grammer mistake Trivial doc correction Add 'defaultNetworkTimeout' to PooledDataSource and UnpooledDataSource Update README.md Follow-up to mybatis#1517 Change to use try-with-resources on doc New versions available. fixes mybatis#1523 Better error message when too many keys are generated Minor refactoring. Reuse PostgreSQL container without restarting Replace postgresql-embedded with Testcontainers Added Stack Overflow as a place for questions Add `.editorconfig` to maintain consistent coding styles [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release mybatis-3.5.1 [ci] Cache maven dependencies. Added edge case tests provided by @kdubb Add comment for derby Revert "Upgrade to derby 10.15.1.3" Upgrade to assertj 3.12.2 ... # Conflicts: # pom.xml # src/main/java/org/apache/ibatis/binding/MapperMethod.java # src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java # src/main/java/org/apache/ibatis/binding/MapperRegistry.java # src/main/java/org/apache/ibatis/builder/annotation/MapperAnnotationBuilder.java # src/main/java/org/apache/ibatis/datasource/unpooled/UnpooledDataSource.java # src/main/java/org/apache/ibatis/plugin/Plugin.java # src/main/java/org/apache/ibatis/reflection/Reflector.java # src/main/java/org/apache/ibatis/session/Configuration.java # src/main/java/org/apache/ibatis/session/SqlSession.java # src/main/java/org/apache/ibatis/session/TransactionIsolationLevel.java # src/main/java/org/apache/ibatis/session/defaults/DefaultSqlSession.java # src/main/java/org/apache/ibatis/transaction/Transaction.java # src/main/java/org/apache/ibatis/transaction/TransactionFactory.java # src/main/java/org/apache/ibatis/transaction/jdbc/JdbcTransaction.java # src/main/java/org/apache/ibatis/transaction/managed/ManagedTransaction.java # src/main/java/org/apache/ibatis/type/ArrayTypeHandler.java # src/main/java/org/apache/ibatis/type/BaseTypeHandler.java # src/main/java/org/apache/ibatis/type/SimpleTypeRegistry.java # src/main/java/org/apache/ibatis/type/TypeAliasRegistry.java # src/main/java/org/apache/ibatis/type/TypeHandlerRegistry.java
Add `.editorconfig` to maintain consistent coding styles
Changes requested on mybatis/mybatis-3#1517
See here for usage.