Permalink
Browse files

Minor tweaks

  • Loading branch information...
1 parent 30a4324 commit bcea26eefeb4731fd2629819df1842c6e09037d1 @mdr mdr committed Apr 23, 2012
View
@@ -8,8 +8,8 @@ object ScalariformBuild extends Build {
lazy val buildSettings = Defaults.defaultSettings ++ Seq(
organization := "scalariform",
version := "0.1.2-SNAPSHOT",
- scalaVersion := "2.9.1",
- crossScalaVersions := Seq("2.8.0", "2.8.1", "2.8.2", "2.8.3-SNAPSHOT", "2.9.0", "2.9.0-1", "2.9.1", "2.10.0-SNAPSHOT"),
+ scalaVersion := "2.9.2",
+ crossScalaVersions := Seq("2.8.0", "2.8.1", "2.8.2", "2.9.0", "2.9.0-1", "2.9.1", "2.9.2", "2.10.0-SNAPSHOT"),
resolvers += ScalaToolsSnapshots,
retrieveManaged := true,
scalacOptions += "-deprecation",
@@ -34,11 +34,11 @@ object ScalariformBuild extends Build {
libraryDependencies <<= (scalaVersion, libraryDependencies) { (sv, deps) =>
val scalatestVersion = sv match {
case "2.8.0" => "org.scalatest" %% "scalatest" % "1.3.1.RC2" % "test"
- case "2.8.1" => "org.scalatest" %% "scalatest" % "1.5.1" % "test"
- case "2.8.2" => "org.scalatest" %% "scalatest" % "1.5.1" % "test"
- case "2.8.3-SNAPSHOT" => "org.scalatest" % "scalatest_2.8.2" % "1.5.1" % "test"
- case "2.10.0-SNAPSHOT" => "org.scalatest" % "scalatest_2.9.1" % "1.6.1" % "test"
- case _ => "org.scalatest" %% "scalatest" % "1.6.1" % "test"
+
+// case "2.8.1" => "org.scalatest" %% "scalatest" % "1.5.1" % "test"
+// case "2.8.2" => "org.scalatest" %% "scalatest" % "1.5.1" % "test"
+ case "2.10.0-SNAPSHOT" => "org.scalatest" % "scalatest_2.9.1" % "1.7.2" % "test"
+ case _ => "org.scalatest" %% "scalatest" % "1.7.2" % "test"
}
deps :+ scalatestVersion
},
View
@@ -1 +1 @@
-sbt.version=0.11.0
+sbt.version=0.11.2
View
@@ -20,10 +20,16 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.scalastyle.scalastyleplugin.core.ScalastyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.scala-ide.sdt.core.scalanature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.scalastyle.scalastyleplugin.core.ScalastyleNature</nature>
</natures>
</projectDescription>
@@ -11,7 +11,7 @@ object RedundantSemicolonDetector extends App {
* @return all semicolons in the source that could safely be removed without changing the meaning
* of the program.
*/
- def findRedundantSemis(source: String) = {
+ def findRedundantSemis(source: String): List[Token] = {
def isRedundant(semi: Token, index: Int): Boolean = {
val sourceWithoutSemi = deleteRange(source, semi.range)
@@ -37,9 +37,9 @@ object RedundantSemicolonDetector extends App {
object Demo extends App {
val source = """
- class A {
+ class A {
def foo = 42;
- def bar = 123; def baz = 1234
+ def bar = 123; def baz = 1234
};"""
val redundantSemis = RedundantSemicolonDetector.findRedundantSemis(source)
val annotated = redundantSemis.reverse.foldLeft(source) { (s, semi) replaceRange(s, semi.range, "<;>") }

0 comments on commit bcea26e

Please sign in to comment.