[JAVA-3809] Add spotless to the build Created: 07/Aug/20  Updated: 30/Mar/22

Status: Backlog
Project: Java Driver
Component/s: Internal
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Esha Bhargava Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JAVA-3922 Share an EditorConfig config Closed
Epic Link: JAVA-3431

 Comments   
Comment by Valentin Kavalenka [ 13/Jan/21 ]

Alternatively investigate: https://github.com/ec4j inline with JAVA-3922.

The only Gradle plugin ec4j has is https://github.com/ec4j/editorconfig-gradle-plugin, and it seems dormant (the last commit was 2 years ago) and outdated (the last commit to https://github.com/ec4j/editorconfig-maven-plugin is 2 month old, so the ec4j team does work on plugins, but not on the Gradle plugin).

editorconfig.org points to only one Gradle plugin, which is https://github.com/ec4j/editorconfig-gradle-plugin. Searching the Internet also does not provide any other Gradle plugins.

I am inclined to think that starting to use a dormant plugin is a good idea. Taking into account that Spotless plugin for Gradle does not support the EditorConfig format, we have to chose either using .editorconfig checked in a repo (flexible settings, but no way to enforce the format by having a pre-commit hook), or using Spotless (we are limited to using one of the few pre-configured formats, but are able to create a pre-commit hook). This was briefly discussed during the JVM triage meeting on 20201-Jan-11, and the decision was to use .editorconfig (though I personally would prefer having a pre-commit hook, which means using Spotless).

Comment by Ross Lawley [ 11/Jan/21 ]

Alternatively investigate: https://github.com/ec4j inline with JAVA-3922.

Comment by Ross Lawley [ 11/Jan/21 ]

https://github.com/diffplug/spotless/issues/734

Comment by Ross Lawley [ 08/Jan/21 ]

The initial hit of using spotless can lead to a lot of code churn over a single commit. Here is a great article about ignoring bulk change commits when using git blame: https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

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