Skip to content

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

Merged
merged 1 commit into from
Apr 29, 2019
Merged

Add .editorconfig to maintain consistent coding styles #1517

merged 1 commit into from
Apr 29, 2019

Conversation

ijliym
Copy link
Contributor

@ijliym ijliym commented Apr 9, 2019

See here for usage.

Copy link
Member

@harawata harawata left a 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
Copy link
Member

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}]
Copy link
Member

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}]
Copy link
Member

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.

Copy link
Contributor Author

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!

Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Member

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're welcome.

@harawata harawata merged commit 7ca2683 into mybatis:master Apr 29, 2019
harawata added a commit that referenced this pull request Apr 29, 2019
harawata added a commit to mybatis/spring that referenced this pull request Apr 29, 2019
George5814 pushed a commit to George5814/mybatis-3 that referenced this pull request May 14, 2019
* 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
pulllock pushed a commit to pulllock/mybatis-3 that referenced this pull request Oct 19, 2023
Add `.editorconfig` to maintain consistent coding styles
pulllock pushed a commit to pulllock/mybatis-3 that referenced this pull request Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-spring that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants