-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Sagacify/staging
Add scoverage metrics and reports
- Loading branch information
Showing
57 changed files
with
3,156 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
*.class | ||
*.log | ||
|
||
# Package files | ||
*.war | ||
*.jar | ||
*.ear | ||
|
||
# Maven | ||
out/ | ||
target/ | ||
|
||
# Eclipse | ||
.project | ||
.classpath | ||
.settings/ | ||
|
||
# IDEA | ||
*.iml | ||
.idea | ||
|
||
# OSX | ||
.DS_STORE | ||
.Trashes | ||
|
||
# Windows | ||
Desktop.ini | ||
Thumbs.db | ||
|
||
# Python | ||
*.pyc | ||
|
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,3 @@ | ||
Run with: | ||
|
||
`mvn clean scoverage:report sonar:sonar` |
12 changes: 12 additions & 0 deletions
12
samples/maven/combined-scala-java-multi-module-sonar/module1/pom.xml
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,12 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>combined-scala-java-multi-module-sonar</artifactId> | ||
<groupId>test</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<artifactId>module1</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
...aven/combined-scala-java-multi-module-sonar/module1/src/main/java/module1/HelloWorld.java
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,16 @@ | ||
package module1; | ||
|
||
/** | ||
* Created by tim on 01/05/15. | ||
*/ | ||
public class HelloWorld { | ||
|
||
public String hello() { | ||
return "Hello"; | ||
} | ||
|
||
public void notCovered() { | ||
System.out.println("YOLO"); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...en/combined-scala-java-multi-module-sonar/module1/src/main/scala/module1/HelloScala.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package module1 | ||
|
||
class HelloScala { | ||
|
||
case class TryOut(some: String, fields: List[String]) | ||
|
||
def test = "Hello" | ||
|
||
def someOther = 42 | ||
} |
11 changes: 11 additions & 0 deletions
11
.../combined-scala-java-multi-module-sonar/module1/src/test/java/module1/HelloWorldTest.java
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,11 @@ | ||
package module1; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class HelloWorldTest { | ||
|
||
@org.junit.Test | ||
public void testHello() throws Exception { | ||
assertEquals("Hello", new HelloWorld().hello()); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
.../maven/combined-scala-java-multi-module-sonar/module1/src/test/scala/HelloScalaTest.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import org.junit.runner.RunWith | ||
import org.scalatest.junit.JUnitRunner | ||
import org.scalatest.{FlatSpec, ShouldMatchers} | ||
import module1.HelloScala | ||
|
||
@RunWith(classOf[JUnitRunner]) | ||
class HelloScalaTest extends FlatSpec with ShouldMatchers { | ||
|
||
"it" should "work" in { | ||
val scala: HelloScala = new HelloScala() | ||
scala.test should equal("Hello") | ||
|
||
scala.TryOut("String", List()) should not equal(true) | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
samples/maven/combined-scala-java-multi-module-sonar/module2/pom.xml
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,12 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>combined-scala-java-multi-module-sonar</artifactId> | ||
<groupId>test</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<artifactId>module2</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0.0</version> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
...ven/combined-scala-java-multi-module-sonar/module2/src/main/java/module2/HelloWorld2.java
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,16 @@ | ||
package module2; | ||
|
||
/** | ||
* Created by tim on 01/05/15. | ||
*/ | ||
public class HelloWorld2 { | ||
|
||
public String hello() { | ||
return "Hello"; | ||
} | ||
|
||
public void notCovered() { | ||
System.out.println("YOLO"); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...n/combined-scala-java-multi-module-sonar/module2/src/main/scala/module2/HelloScala2.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package module2 | ||
|
||
class HelloScala2 { | ||
|
||
case class TryOut(some: String, fields: List[String]) | ||
|
||
def test = "Hello" | ||
|
||
def someOther = 42 | ||
} |
11 changes: 11 additions & 0 deletions
11
...s/maven/combined-scala-java-multi-module-sonar/module2/src/test/java/HelloWorld2Test.java
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,11 @@ | ||
import module2.HelloWorld2; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class HelloWorld2Test { | ||
|
||
@org.junit.Test | ||
public void testHello() throws Exception { | ||
assertEquals("Hello", new HelloWorld2().hello()); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...maven/combined-scala-java-multi-module-sonar/module2/src/test/scala/HelloScala2Test.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import module2.HelloScala2 | ||
import org.junit.runner.RunWith | ||
import org.scalatest.junit.JUnitRunner | ||
import org.scalatest.{FlatSpec, ShouldMatchers} | ||
|
||
@RunWith(classOf[JUnitRunner]) | ||
class HelloScala2Test extends FlatSpec with ShouldMatchers { | ||
|
||
"it" should "work" in { | ||
val scala: HelloScala2 = new HelloScala2() | ||
scala.test should equal("Hello") | ||
|
||
scala.TryOut("String", List()) should not equal(true) | ||
} | ||
|
||
} |
Oops, something went wrong.