diff --git a/lib/scalastyle_config.xml b/lib/scalastyle_config.xml
new file mode 100644
index 0000000..5110be2
--- /dev/null
+++ b/lib/scalastyle_config.xml
@@ -0,0 +1,150 @@
+
+ Scalastyle standard configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Avoid print line, use logger.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5f8cf8a..d49c740 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,6 @@
${project.basedir}/src/main/scala
${project.basedir}/src/test/scala
${project.basedir}/lib/scalastyle_config.xml
- ${project.basedir}/scalastyle-output.xml
UTF-8
diff --git a/src/main/scala/com/microsoft/azure/sqldb/spark/config/SqlDBConfigBuilder.scala b/src/main/scala/com/microsoft/azure/sqldb/spark/config/SqlDBConfigBuilder.scala
index 3caf769..edb0e3b 100644
--- a/src/main/scala/com/microsoft/azure/sqldb/spark/config/SqlDBConfigBuilder.scala
+++ b/src/main/scala/com/microsoft/azure/sqldb/spark/config/SqlDBConfigBuilder.scala
@@ -22,7 +22,7 @@
*/
package com.microsoft.azure.sqldb.spark.config
-import com.microsoft.azure.sqldb.spark.config.Config._
+import com.microsoft.azure.sqldb.spark.config.Config.Property
case class SqlDBConfigBuilder(props: Map[Property, Any] = Map()) extends {
diff --git a/src/main/scala/com/microsoft/azure/sqldb/spark/connect/package.scala b/src/main/scala/com/microsoft/azure/sqldb/spark/connect/package.scala
index 71b54a6..ccdae74 100644
--- a/src/main/scala/com/microsoft/azure/sqldb/spark/connect/package.scala
+++ b/src/main/scala/com/microsoft/azure/sqldb/spark/connect/package.scala
@@ -66,4 +66,4 @@ package object connect {
@DeveloperApi
implicit def toDataFrameFunctions[T](ds: Dataset[T]): DataFrameFunctions[Row] = DataFrameFunctions[Row](ds.toDF())
-}
\ No newline at end of file
+}
diff --git a/src/main/scala/com/microsoft/azure/sqldb/spark/query/package.scala b/src/main/scala/com/microsoft/azure/sqldb/spark/query/package.scala
index 6f71676..c43957e 100644
--- a/src/main/scala/com/microsoft/azure/sqldb/spark/query/package.scala
+++ b/src/main/scala/com/microsoft/azure/sqldb/spark/query/package.scala
@@ -41,5 +41,5 @@ package object query {
*/
@DeveloperApi
implicit def toQueryFunctions(sqlContext: SQLContext): QueryFunctions = QueryFunctions(sqlContext)
-
+
}
diff --git a/src/test/scala/com/microsoft/azure/sqldb/spark/SqlDBSpark.scala b/src/test/scala/com/microsoft/azure/sqldb/spark/SqlDBSpark.scala
index 7c7a445..1b4ebce 100644
--- a/src/test/scala/com/microsoft/azure/sqldb/spark/SqlDBSpark.scala
+++ b/src/test/scala/com/microsoft/azure/sqldb/spark/SqlDBSpark.scala
@@ -1,7 +1,27 @@
+/**
+ * The MIT License (MIT)
+ * Copyright (c) 2018 Microsoft Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
package com.microsoft.azure.sqldb.spark
import org.scalatest.{BeforeAndAfter, BeforeAndAfterEach, FlatSpec, Matchers}
-trait SqlDBSpark extends FlatSpec with Matchers with BeforeAndAfter with BeforeAndAfterEach {
-
-}
+trait SqlDBSpark extends FlatSpec with Matchers with BeforeAndAfter with BeforeAndAfterEach
diff --git a/src/test/scala/com/microsoft/azure/sqldb/spark/bulk/BulkCopyUtilsSpec.scala b/src/test/scala/com/microsoft/azure/sqldb/spark/bulk/BulkCopyUtilsSpec.scala
index f97b786..5eb33c8 100644
--- a/src/test/scala/com/microsoft/azure/sqldb/spark/bulk/BulkCopyUtilsSpec.scala
+++ b/src/test/scala/com/microsoft/azure/sqldb/spark/bulk/BulkCopyUtilsSpec.scala
@@ -1,3 +1,25 @@
+/**
+ * The MIT License (MIT)
+ * Copyright (c) 2018 Microsoft Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
package com.microsoft.azure.sqldb.spark.bulk
import com.microsoft.azure.sqldb.spark.SqlDBSpark
diff --git a/src/test/scala/com/microsoft/azure/sqldb/spark/config/ConfigSpec.scala b/src/test/scala/com/microsoft/azure/sqldb/spark/config/ConfigSpec.scala
index c5d6c3b..7b64801 100644
--- a/src/test/scala/com/microsoft/azure/sqldb/spark/config/ConfigSpec.scala
+++ b/src/test/scala/com/microsoft/azure/sqldb/spark/config/ConfigSpec.scala
@@ -27,20 +27,20 @@ import com.microsoft.azure.sqldb.spark.SqlDBSpark
class ConfigSpec extends SqlDBSpark {
it should "throw IllegalArgumentException if required properties aren't met" in {
- a [IllegalArgumentException] should be thrownBy {
+ an [IllegalArgumentException] should be thrownBy {
Config(Map("url" -> "mysql.database.windows.net"))
}
}
it should "throw IllegalArgumentException if queryCustom and dbTable are both stated" in {
- a [IllegalArgumentException] should be thrownBy {
+ an [IllegalArgumentException] should be thrownBy {
Config(Map(
"url" -> "mysql.database.windows.net",
- "databaseName" -> "",
- "user" -> "",
- "password" -> "",
- "dbTable" -> "",
- "QueryCustom" -> ""
+ "databaseName" -> "MyDatabase",
+ "user" -> "MyUsername",
+ "password" -> "**********",
+ "dbTable" -> "MyDBTable",
+ "QueryCustom" -> "MyQueryCustom"
))
}
}
diff --git a/src/test/scala/com/microsoft/azure/sqldb/spark/connect/ConnectionUtilsSpec.scala b/src/test/scala/com/microsoft/azure/sqldb/spark/connect/ConnectionUtilsSpec.scala
index d3a0a63..7fa52ce 100644
--- a/src/test/scala/com/microsoft/azure/sqldb/spark/connect/ConnectionUtilsSpec.scala
+++ b/src/test/scala/com/microsoft/azure/sqldb/spark/connect/ConnectionUtilsSpec.scala
@@ -86,4 +86,4 @@ class ConnectionUtilsSpec extends SqlDBSpark {
))
ConnectionUtils.getTableOrQuery(queryConfig) should be (ConnectionUtils.getQueryCustom(queryCustom))
}
-}
\ No newline at end of file
+}