Skip to content

style: Reconfigure Scalafmt and reformat the whole project #149

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
Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ version = "2.3.2"

maxColumn = 140
assumeStandardLibraryStripMargin = true
continuationIndent.defnSite = 2
align.arrowEnumeratorGenerator = true
align.openParenCallSite = true
align.openParenDefnSite = true
rewrite.rules = [RedundantParens, SortImports, SortModifiers, PreferCurlyFors]
includeNoParensInSelectChains = true
lineEndings = preserve
onTestFailure = "To fix this, run 'sbt fixAll' from the project root directory."
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,40 @@ object CassandraDatastaxDriverModule {
stringProperty(REQUEST_TRACE_CONSISTENCY)(cfg.advanced.request.trace.consistency.toStringRepr),
booleanProperty(REQUEST_LOG_WARNINGS)(cfg.advanced.request.logWarnings),
optional(intListProperty(METRICS_SESSION_ENABLED), cfg.advanced.metrics.session.map(_.enabled)),
optional(durationProperty(METRICS_SESSION_CQL_REQUESTS_HIGHEST),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.highestLatency))),
optional(durationProperty(METRICS_SESSION_CQL_REQUESTS_INTERVAL),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.refreshInterval))),
optional(intProperty(METRICS_SESSION_CQL_REQUESTS_DIGITS),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.significantDigits))),
optional(durationProperty(METRICS_SESSION_THROTTLING_HIGHEST),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.highestLatency)))),
optional(durationProperty(METRICS_SESSION_THROTTLING_INTERVAL),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.refreshInterval)))),
optional(intProperty(METRICS_SESSION_THROTTLING_DIGITS),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.significantDigits)))),
optional(
durationProperty(METRICS_SESSION_CQL_REQUESTS_HIGHEST),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.highestLatency))
),
optional(
durationProperty(METRICS_SESSION_CQL_REQUESTS_INTERVAL),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.refreshInterval))
),
optional(
intProperty(METRICS_SESSION_CQL_REQUESTS_DIGITS),
cfg.advanced.metrics.session.flatMap(_.cqlRequests.map(_.significantDigits))
),
optional(
durationProperty(METRICS_SESSION_THROTTLING_HIGHEST),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.highestLatency)))
),
optional(
durationProperty(METRICS_SESSION_THROTTLING_INTERVAL),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.refreshInterval)))
),
optional(
intProperty(METRICS_SESSION_THROTTLING_DIGITS),
cfg.advanced.metrics.session.flatMap(_.throttling.flatMap(_.delay.map(_.significantDigits)))
),
optional(intListProperty(METRICS_NODE_ENABLED), cfg.advanced.metrics.node.map(_.enabled)),
optional(durationProperty(METRICS_NODE_CQL_MESSAGES_HIGHEST),
cfg.advanced.metrics.node.flatMap(_.cqlRequests.map(_.highestLatency))),
optional(
durationProperty(METRICS_NODE_CQL_MESSAGES_HIGHEST),
cfg.advanced.metrics.node.flatMap(_.cqlRequests.map(_.highestLatency))
),
optional(intProperty(METRICS_NODE_CQL_MESSAGES_DIGITS), cfg.advanced.metrics.node.flatMap(_.cqlRequests.map(_.significantDigits))),
optional(durationProperty(METRICS_NODE_CQL_MESSAGES_INTERVAL),
cfg.advanced.metrics.node.flatMap(_.cqlRequests.map(_.refreshInterval))),
optional(
durationProperty(METRICS_NODE_CQL_MESSAGES_INTERVAL),
cfg.advanced.metrics.node.flatMap(_.cqlRequests.map(_.refreshInterval))
),
durationProperty(HEARTBEAT_INTERVAL)(cfg.advanced.heartbeat.interval),
durationProperty(HEARTBEAT_TIMEOUT)(cfg.advanced.heartbeat.timeout),
booleanProperty(SOCKET_TCP_NODELAY)(cfg.advanced.socket.tcpNoDelay),
Expand Down Expand Up @@ -138,8 +154,7 @@ object CassandraDatastaxDriverModule {
w(b)
}

val loader = cfg
.profiles
val loader = cfg.profiles
.foldRight(builder) { (p, b) =>
List[DriverBuilder => DriverBuilder](
durationProperty(REQUEST_TIMEOUT)(p.basic.request.timeout),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.avast.sst.datastax.config

/** Configuration for Cassandra Datastax Driver. */
final case class CassandraDatastaxDriverConfig(basic: BasicConfig,
advanced: AdvancedConfig = AdvancedConfig.Default,
profiles: List[ProfileConfig] = List.empty)
final case class CassandraDatastaxDriverConfig(
basic: BasicConfig,
advanced: AdvancedConfig = AdvancedConfig.Default,
profiles: List[ProfileConfig] = List.empty
)
Loading