[JAVA-3922] Share an EditorConfig config Created: 07/Jan/21  Updated: 28/Oct/23  Resolved: 14/Jan/21

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.0

Type: Task Priority: Trivial - P5
Reporter: Valentin Kavalenka Assignee: Valentin Kavalenka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File .editorconfig    
Issue Links:
Related
related to JAVA-3931 Share IntelliJ IDEA settings Backlog
related to JAVA-3809 Add spotless to the build Backlog
Documentation Changes: Not Needed

 Description   

It'd be good to use a common style for the code in the repo (what exact style we use is much less important than the universality of its application). We have at least the following options:

  1. Add an EditorConfig file to the root of the repo (jeff.yemin provided his .editorconfig). This way both internal and external contributors will use the same code style, provided that they have IDE / text editor that supports this format (IntelliJ IDEA does: https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig).
  2. JAVA-3809.


 Comments   
Comment by Githook User [ 14/Jan/21 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Add .editorconfig (#633)

IntlliJ IDEA support: https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig

JAVA-3922
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f9bf9504f4812dfa6efde2d1d87d1870435e5933

Comment by Ross Lawley [ 08/Jan/21 ]

This is similar in intent to JAVA-3809.

The benefits of using spotless is it can be automated on the compile step in gradle to ensure that code is reformatted to the coding standard.

Spotless is used to great effect in the KAFKA code base.

Generated at Thu Feb 08 09:00:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.