Github user ScrapCodes commented on a diff in the pull request:
https://github.com/apache/spark/pull/284#discussion_r11194651
--- Diff:
project/spark-style/src/main/scala/org/apache/spark/scalastyle/SpaceAfterColonStyleCheck.scala
---
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.scalastyle
+
+import scalariform.lexer.Tokens.COLON
+import scalariform.parser.CompilationUnit
+import org.scalastyle._
+
+class SpaceAfterColonStyleCheck extends ScalariformChecker {
--- End diff --
We can not have any Token checker as colon. Since in case of colon we
ensure no space before it and exactly one space after it.
for example
```scala
val a: Int = 1 // valid
val b : Int = 1 //Invalid
val c:Int = 1 //Invalid
val c :Int = 1 //Invalid
```
Also there is a separate check for keywords.
https://github.com/ScrapCodes/scalastyle/commit/cccb6b6d8e04521daa8af7e4f8c0e0bb35606f22
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---