dwango/scalastyle — pull request #4 by yzgw (2013-08-14 05:00:50+00:00)
Title: Add NoWhitespaceBeforeColonChecker and WhitespaceAfterColonChecker

These checkers assist to be no whitespace before colon, and only one whitespace after colon for [Scala Style Guide](http://docs.scala-lang.org/style/types.html).
The checker covers following statements

#### Value and Variable

// OK
val i: Int = 1
// NG
val j :Int = 1

#### Function

// OK
def foo(x: Int, y: Int): Unit { }
def bar: Unit { }
// NG
def foo(x :Int, y :Int) :Unit { }
def bar: Unit { }

#### Class

// OK
class Foobar(a: Int, b: Int) { }
// NG
class Foobar(a :Int, b :Int) { }

#### Case

// OK
val l = List(Dog, Dog, Cat, Dog, Cat).map{
case i: Dog => 2
case s: Cat => 1
case _ => 0
}
// NG
val l = List(Dog, Dog, Cat, Dog, Cat).map{
case i :Dog => 2
case s :Cat => 1
case _ => 0
}

This style is adopted by most of the Scala standard library.