-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7d526e
commit 3fbb9e3
Showing
8 changed files
with
161 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
style = default | ||
maxColumn = 120 | ||
|
||
align.openParenCallSite = false | ||
align.openParenDefnSite = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: scala | ||
sudo: false | ||
|
||
scala: | ||
- 2.11.11 | ||
- 2.12.3 | ||
jdk: | ||
- oraclejdk8 | ||
|
||
# cache config taken from http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html | ||
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot/ | ||
|
||
before_cache: | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
|
||
# build with scoverage report and upload to codecov | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION coverage test coverageReport coverageAggregate | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1") | ||
// code style | ||
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.9.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0") | ||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.1") | ||
|
||
// dependency management | ||
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.1") | ||
|
||
// artifact publishing | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1") | ||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") | ||
|
||
// documentation | ||
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<scalastyle> | ||
<!-- whitespace checks --> | ||
<check class="org.scalastyle.file.FileTabChecker" level="warning"/> | ||
<check class="org.scalastyle.file.WhitespaceEndOfLineChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.SpacesAfterPlusChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.SpacesBeforePlusChecker" level="warning"/> | ||
|
||
<!-- naming checks --> | ||
<check class="org.scalastyle.scalariform.ClassNamesChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.MethodNamesChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.ObjectNamesChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.PackageObjectNamesChecker" level="warning"/> | ||
|
||
<!-- size/complexities checks --> | ||
<check class="org.scalastyle.file.FileLengthChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.CyclomaticComplexityChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.MethodLengthChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NumberOfMethodsInTypeChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NumberOfTypesChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.ParameterNumberChecker" level="warning"/> | ||
|
||
<check class="org.scalastyle.file.FileLineLengthChecker" level="warning"> | ||
<parameters> | ||
<parameter name="maxLineLength">120</parameter> | ||
</parameters> | ||
</check> | ||
|
||
<!-- code smells --> | ||
<check class="org.scalastyle.scalariform.CovariantEqualsChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.EqualsHashCodeChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.IfBraceChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.MagicNumberChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NoCloneChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NoFinalizeChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.NullChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.ReturnChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.StructuralTypeChecker" level="warning"/> | ||
<check class="org.scalastyle.scalariform.UppercaseLChecker" level="warning"/> | ||
|
||
<check customId="javaconversions" level="error" class="org.scalastyle.scalariform.TokenChecker"> | ||
<parameters> | ||
<parameter name="regex">import.*JavaConversions</parameter> | ||
</parameters> | ||
<customMessage>Use JavaConverters instead of JavaConversions</customMessage> | ||
</check> | ||
|
||
<check class="org.scalastyle.scalariform.IllegalImportsChecker" level="warning"> | ||
<parameters> | ||
<parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter> | ||
</parameters> | ||
</check> | ||
|
||
<check class="org.scalastyle.file.RegexChecker" level="warning"> | ||
<parameters> | ||
<parameter name="regex"><![CDATA[println]]></parameter> | ||
</parameters> | ||
<customMessage>Remove debug println</customMessage> | ||
</check> | ||
</scalastyle> |
16 changes: 16 additions & 0 deletions
16
xml-scalatest/src/main/scala/software/purpledragon/xml/scalatest/XmlMatchers.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
xml-scalatest/src/test/scala/software/purpledragon/xml/scalatest/XmlMatchersSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
/* | ||
* Copyright 2017 Michael Stringer | ||
* | ||
* Licensed 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 software.purpledragon.xml.scalatest | ||
|
||
import org.scalatest.{FlatSpec, Matchers} | ||
|
||
class XmlMatchersSpec extends FlatSpec with Matchers with XmlMatchers { | ||
|
||
} | ||
class XmlMatchersSpec extends FlatSpec with Matchers with XmlMatchers {} |