Skip to content

Commit 4e55316

Browse files
committed
scalafmt pass
This change only adds scalafmt back to the pom.xmls, and then makes every Scala pass it. There are no functional changes. Change-Id: Icfa7ba2d75ad63d492315888775a527f70a94ced Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/230726 Tested-by: Graham Pople <[email protected]> Reviewed-by: Graham Pople <[email protected]>
1 parent 94ff75b commit 4e55316

File tree

143 files changed

+2170
-1959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2170
-1959
lines changed

scala-client/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,31 @@
190190
</executions>
191191
</plugin>
192192

193+
<plugin>
194+
<groupId>org.antipathy</groupId>
195+
<!-- use mvn-scalafmt_2.13 for all scala profiles including 3 -->
196+
<artifactId>mvn-scalafmt_2.13</artifactId>
197+
<version>${mvn-scalafmt.version}</version>
198+
<configuration>
199+
<configLocation>${project.basedir}/../.scalafmt.conf</configLocation>
200+
<sourceDirectories>
201+
<param>${project.basedir}/src/main/scala</param>
202+
<param>${project.basedir}/src/main/scala-2</param>
203+
<param>${project.basedir}/src/main/scala-2-13</param>
204+
<param>${project.basedir}/src/main/scala-2-13-</param>
205+
<param>${project.basedir}/src/main/scala-3</param>
206+
</sourceDirectories>
207+
</configuration>
208+
<executions>
209+
<execution>
210+
<phase>validate</phase>
211+
<goals>
212+
<goal>format</goal>
213+
</goals>
214+
</execution>
215+
</executions>
216+
</plugin>
217+
193218
<plugin>
194219
<groupId>org.codehaus.mojo</groupId>
195220
<artifactId>build-helper-maven-plugin</artifactId>

scala-client/src/main/scala-2/com/couchbase/client/scala/AsyncBinaryCollection.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
4040

4141
private[scala] val environment = async.environment
4242
private[scala] val kvTimeout: Durability => Duration = async.kvTimeout
43-
private[scala] val kvBinaryOps = async.couchbaseOps.kvBinaryOps(async.keyspace)
43+
private[scala] val kvBinaryOps = async.couchbaseOps.kvBinaryOps(async.keyspace)
4444

4545
/** Add bytes to the end of a Couchbase binary document.
4646
*
@@ -86,7 +86,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
8686
/** Add bytes to the beginning of a Couchbase binary document.
8787
*
8888
* $Same
89-
* */
89+
*/
9090
def prepend(
9191
id: String,
9292
content: Array[Byte],
@@ -107,7 +107,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
107107
/** Add bytes to the beginning of a Couchbase binary document.
108108
*
109109
* $Same
110-
* */
110+
*/
111111
def prepend(
112112
id: String,
113113
content: Array[Byte],
@@ -127,7 +127,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
127127
/** Increment a Couchbase 'counter' document.
128128
*
129129
* $Same
130-
* */
130+
*/
131131
def increment(
132132
id: String,
133133
delta: Long,
@@ -145,7 +145,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
145145
/** Increment a Couchbase 'counter' document.
146146
*
147147
* $Same
148-
* */
148+
*/
149149
def increment(
150150
id: String,
151151
delta: Long,
@@ -166,7 +166,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
166166
/** Decrement a Couchbase 'counter' document.
167167
*
168168
* $Same
169-
* */
169+
*/
170170
def decrement(
171171
id: String,
172172
delta: Long,
@@ -184,7 +184,7 @@ class AsyncBinaryCollection(private[scala] val async: AsyncCollection) {
184184
/** Decrement a Couchbase 'counter' document.
185185
*
186186
* $Same
187-
* */
187+
*/
188188
def decrement(
189189
id: String,
190190
delta: Long,

scala-client/src/main/scala-2/com/couchbase/client/scala/AsyncBucket.scala

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ class AsyncBucket private[scala] (
4646
private[scala] val couchbaseOps: CoreCouchbaseOps,
4747
private[scala] val environment: ClusterEnvironment
4848
) extends AsyncBucketBase {
49-
val reactive = new ReactiveBucket(this)
49+
val reactive = new ReactiveBucket(this)
5050

5151
lazy val viewIndexes = new AsyncViewIndexManager(reactive.viewIndexes)
5252

53-
lazy val collections = new AsyncCollectionManager(this)
53+
lazy val collections = new AsyncCollectionManager(this)
5454

5555
/** Performs a view query against the cluster.
5656
*
@@ -104,7 +104,6 @@ class AsyncBucket private[scala] (
104104
viewQuery(designDoc, viewName, ViewOptions(timeout = Some(timeout)))
105105
}
106106

107-
108107
/** Performs application-level ping requests with custom options against services in the Couchbase cluster.
109108
*
110109
* Note that this operation performs active I/O against services and endpoints to assess their health. If you do
@@ -161,7 +160,10 @@ class AsyncBucket private[scala] (
161160
* @param timeout the maximum time to wait until readiness.
162161
* @param options options to customize the wait
163162
*/
164-
def waitUntilReady(timeout: Duration, options: WaitUntilReadyOptions = WaitUntilReadyOptions.Default): Future[Unit] = {
163+
def waitUntilReady(
164+
timeout: Duration,
165+
options: WaitUntilReadyOptions = WaitUntilReadyOptions.Default
166+
): Future[Unit] = {
165167
couchbaseOps match {
166168
case core: Core =>
167169
FutureConversions
@@ -178,4 +180,4 @@ class AsyncBucket private[scala] (
178180
case _ => Future.failed(CoreProtostellarUtil.unsupportedCurrentlyInProtostellar())
179181
}
180182
}
181-
}
183+
}

0 commit comments

Comments
 (0)