mirror of https://github.com/sbt/sbt.git
Typo fix
This commit is contained in:
parent
bc90cd2866
commit
d437e8299e
|
|
@ -9,8 +9,8 @@ private[sbt] object SbtRefactorings {
|
||||||
import sbt.internal.parser.SbtParser.{ END_OF_LINE, FAKE_FILE }
|
import sbt.internal.parser.SbtParser.{ END_OF_LINE, FAKE_FILE }
|
||||||
import sbt.internal.SessionSettings.{ SessionSetting, SbtConfigFile }
|
import sbt.internal.SessionSettings.{ SessionSetting, SbtConfigFile }
|
||||||
|
|
||||||
val emtpyString = ""
|
val emptyString = ""
|
||||||
val reverseOrdeingInt = Ordering[Int].reverse
|
val reverseOrderingInt = Ordering[Int].reverse
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refactoring a `.sbt` file so that the new settings are used instead of any existing settings.
|
* Refactoring a `.sbt` file so that the new settings are used instead of any existing settings.
|
||||||
|
|
@ -25,7 +25,7 @@ private[sbt] object SbtRefactorings {
|
||||||
val (file, lines) = configFile
|
val (file, lines) = configFile
|
||||||
val split = SbtParser(FAKE_FILE, lines)
|
val split = SbtParser(FAKE_FILE, lines)
|
||||||
val recordedCommands = recordCommands(commands, split)
|
val recordedCommands = recordCommands(commands, split)
|
||||||
val sortedRecordedCommands = recordedCommands.sortBy(_._1)(reverseOrdeingInt)
|
val sortedRecordedCommands = recordedCommands.sortBy(_._1)(reverseOrderingInt)
|
||||||
|
|
||||||
val newContent = replaceFromBottomToTop(lines.mkString(END_OF_LINE), sortedRecordedCommands)
|
val newContent = replaceFromBottomToTop(lines.mkString(END_OF_LINE), sortedRecordedCommands)
|
||||||
(file, newContent.lines.toList)
|
(file, newContent.lines.toList)
|
||||||
|
|
@ -63,7 +63,7 @@ private[sbt] object SbtRefactorings {
|
||||||
if (name == treeName) {
|
if (name == treeName) {
|
||||||
val replacement =
|
val replacement =
|
||||||
if (acc.isEmpty) command.mkString(END_OF_LINE)
|
if (acc.isEmpty) command.mkString(END_OF_LINE)
|
||||||
else emtpyString
|
else emptyString
|
||||||
(tree.pos.start, st, replacement) +: acc
|
(tree.pos.start, st, replacement) +: acc
|
||||||
} else {
|
} else {
|
||||||
acc
|
acc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue