[JAVA-5033] Kotlin and Scala check task depends on spotlessApply Created: 22/Jun/23  Updated: 28/Oct/23  Resolved: 23/Jun/23

Status: Closed
Project: Java Driver
Component/s: Build, Test Improvement
Affects Version/s: None
Fix Version/s: 4.10.1

Type: Improvement Priority: Unknown
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

While convenient, this does mean checked in source code (that hasn't run check) can be reformatted causing a build to be marked dirty.

1. Use a githook to run spotlessApply automagically.
Make check depend on spotlessCheck and fail if spotless hasn't been run
2. Add a spotlessCheck to static checks in evergreen



 Comments   
Comment by Githook User [ 22/Jun/23 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Scala: Fix spotless errors

JAVA-5033
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/897565cb321cd41ca7ade0e553f3084780cf0057

Comment by Githook User [ 22/Jun/23 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Build: Ensure spotless checks are run

Turn off automatic running of spotlessApply when
running the static analysis checks.

JAVA-5033
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e4a78044a31cfe57d91dab74af1331ca67c80b3b

Comment by Jeffrey Yemin [ 22/Jun/23 ]

Another option: add a check as the last step of the static analysis task that fails if the tree is dirty

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