From b8d8f022c890e93eba2eb2e6ee903eccca96da17 Mon Sep 17 00:00:00 2001 From: Augustin Borsu Date: Fri, 22 Apr 2016 22:37:19 +0200 Subject: [PATCH] feat(scalastyle): 0.7.0 -> 0.8.0 --- pom.xml | 2 +- .../ScalastyleAdaptedQualityProfileSpec.scala | 8 ++++---- .../ScalastyleDefaultQualityProfileSpec.scala | 4 ++-- .../sonar/scalastyle/ScalastyleRepositorySpec.scala | 10 +++++----- .../sonar/scalastyle/ScalastyleResourcesSpec.scala | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 7cb79c0..173e8f5 100755 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ org.scalastyle scalastyle_${scala.major.version} - 0.7.0 + 0.8.0 org.scala-lang diff --git a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleAdaptedQualityProfileSpec.scala b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleAdaptedQualityProfileSpec.scala index ef5ad2f..3744a02 100644 --- a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleAdaptedQualityProfileSpec.scala +++ b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleAdaptedQualityProfileSpec.scala @@ -38,9 +38,9 @@ class ScalastyleQualityProfileSpec extends FlatSpec with Matchers with MockitoSu val testee = new ScalastyleQualityProfile(TestRuleFinderWithTemplates) } - val rulesCount = 37 - val parametersCount = 19 - + val rulesCount = 38 + val parametersCount = 21 + "a scalastyle quality profile" should "create a default profile" in new Fixture { val rulesProfile = testee.createProfile(validationMessages) @@ -56,7 +56,7 @@ class ScalastyleQualityProfileSpec extends FlatSpec with Matchers with MockitoSu } it should "have all the parameters in default config" in new Fixture { - val totalParameters = parametersCount + (rulesCount * 1) + val totalParameters = parametersCount + (rulesCount * 1) val rulesProfile = testee.createProfile(validationMessages) diff --git a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleDefaultQualityProfileSpec.scala b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleDefaultQualityProfileSpec.scala index 503e5f2..ad9f2a1 100644 --- a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleDefaultQualityProfileSpec.scala +++ b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleDefaultQualityProfileSpec.scala @@ -39,7 +39,7 @@ class ScalastyleDefaultQualityProfileSpec extends FlatSpec with Matchers with Mo } val rulesCount = 19 // rules without templates - + "a scalastyle quality profile" should "create a default profile" in new Fixture { val rulesProfile = testee.createProfile(validationMessages) @@ -55,7 +55,7 @@ class ScalastyleDefaultQualityProfileSpec extends FlatSpec with Matchers with Mo } it should "have all the parameters in default config" in new Fixture { - val totalParameters = (rulesCount * 1) + val totalParameters = (rulesCount * 1) val rulesProfile = testee.createProfile(validationMessages) diff --git a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleRepositorySpec.scala b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleRepositorySpec.scala index e7ee08e..49113e4 100644 --- a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleRepositorySpec.scala +++ b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleRepositorySpec.scala @@ -53,9 +53,9 @@ class ScalastyleRepositorySpec extends FlatSpec with Matchers with Inspectors wi r.repository().name() shouldEqual Constants.RepositoryName } } - - it should "consist of 60 rules" in { - rules.size() shouldEqual 60 + + it should "consist of 63 rules" in { + rules.size() shouldEqual 63 } it should "set default severity to major" in { @@ -65,7 +65,7 @@ class ScalastyleRepositorySpec extends FlatSpec with Matchers with Inspectors wi it should "give a name to every rule" in { rules.filter(_.name == null) should be(empty) } - + it should "set the ClazzParam for every rule" in { rules.filter(_.param(Constants.ClazzParam) == null) should be(empty) } @@ -119,7 +119,7 @@ class ScalastyleRepositorySpec extends FlatSpec with Matchers with Inspectors wi val rule = rules.find(_.key == "scalastyle_ParameterNumberChecker") rule.get.param("maxParameters").defaultValue.toInt shouldEqual 8 } - + it should "provide default parameters to scalastyle preferred defaults for rules with multiple parameters" in { val rule = rules.find(_.key == "scalastyle_MethodNamesChecker") rule.get.param("regex").defaultValue shouldEqual "^[a-z][A-Za-z0-9]*(_=)?$" diff --git a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleResourcesSpec.scala b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleResourcesSpec.scala index 83f356a..fdeac9a 100644 --- a/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleResourcesSpec.scala +++ b/src/test/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleResourcesSpec.scala @@ -56,7 +56,7 @@ class ScalastyleResourcesSpec extends FlatSpec with Matchers with Inspectors wi } it should "return all defined checkers" in { - ScalastyleResources.allDefinedRules.size shouldEqual 60 + ScalastyleResources.allDefinedRules.size shouldEqual 63 } it should "give rules a description" in {