Skip to content

Commit

Permalink
Merge pull request ncredinburgh#9 from aborsu/update-0.8.0
Browse files Browse the repository at this point in the history
Update scalastyle 0.7.0 -> 0.8.0
  • Loading branch information
hcoles committed Apr 25, 2016
2 parents d7d92fd + b8d8f02 commit 923d73e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<dependency>
<groupId>org.scalastyle</groupId>
<artifactId>scalastyle_${scala.major.version}</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
Expand Down Expand Up @@ -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]*(_=)?$"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 923d73e

Please sign in to comment.