Skip to content

Commit 658d522

Browse files
committed
ScalafmtConfig: make most methods package-private
1 parent 38850f6 commit 658d522

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: scalafmt-core/shared/src/main/scala/org/scalafmt/config/ScalafmtConfig.scala

+8-8
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ case class ScalafmtConfig(
140140
fileOverride: Conf.Obj = Conf.Obj.empty,
141141
xmlLiterals: XmlLiterals = XmlLiterals()
142142
) {
143-
lazy val alignMap: Map[String, Seq[AlignToken.Matcher]] =
143+
private[scalafmt] lazy val alignMap: Map[String, Seq[AlignToken.Matcher]] =
144144
align.tokens.map(x => x.code -> x).toMap.map { case (k, v) =>
145145
k -> v.getMatcher
146146
}
@@ -173,16 +173,16 @@ case class ScalafmtConfig(
173173
.getOrElse(this)
174174
}
175175

176-
lazy val encloseSelectChains =
176+
private[scalafmt] lazy val encloseSelectChains =
177177
optIn.encloseClassicChains || newlines.source.ne(Newlines.classic)
178178

179-
def indentOperatorTopLevelOnly =
179+
private[scalafmt] def indentOperatorTopLevelOnly =
180180
indentOperator.topLevelOnly && !unindentTopLevelOperators
181181

182-
lazy val docstringsWrapMaxColumn: Int =
182+
private[scalafmt] lazy val docstringsWrapMaxColumn: Int =
183183
docstrings.wrapMaxColumn.getOrElse(maxColumn)
184184

185-
lazy val dialect = runner.getDialect
185+
private[scalafmt] lazy val dialect = runner.getDialect
186186
}
187187

188188
object ScalafmtConfig {
@@ -243,7 +243,7 @@ object ScalafmtConfig {
243243

244244
/** Ready styles provided by scalafmt.
245245
*/
246-
val activeStyles: Map[String, ScalafmtConfig] =
246+
private val activeStyles: Map[String, ScalafmtConfig] =
247247
Map(
248248
"Scala.js" -> scalaJs,
249249
"IntelliJ" -> intellij
@@ -252,13 +252,13 @@ object ScalafmtConfig {
252252
defaultWithAlign
253253
)
254254

255-
val availableStyles: Map[String, ScalafmtConfig] = {
255+
private val availableStyles: Map[String, ScalafmtConfig] = {
256256
activeStyles ++ LoggerOps.name2style(
257257
scalaJs
258258
)
259259
}.map { case (k, v) => k.toLowerCase -> v }
260260

261-
def conservativeRunner: ScalafmtRunner =
261+
private[scalafmt] def conservativeRunner: ScalafmtRunner =
262262
default.runner.copy(
263263
optimizer = default.runner.optimizer.copy(
264264
// The tests were not written in this style

0 commit comments

Comments
 (0)