diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-07-24 11:49:51 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-07-24 12:22:48 +0200 |
commit | 05e45302f2bc7263da1d298bf2ad4178bebdd26f (patch) | |
tree | a5492b9b556079df001e486548df96c4439d00bc /it/it-projects | |
parent | 40f40f2432bcf0874f264d605ef210d05c89bc74 (diff) | |
download | sonarqube-05e45302f2bc7263da1d298bf2ad4178bebdd26f.tar.gz sonarqube-05e45302f2bc7263da1d298bf2ad4178bebdd26f.zip |
Add some ITs on measures
Diffstat (limited to 'it/it-projects')
19 files changed, 125 insertions, 1 deletions
diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties new file mode 100644 index 00000000000..a081a0e6342 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A1 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo new file mode 100644 index 00000000000..74d29a4fa08 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo @@ -0,0 +1,16 @@ +package com.sonar.it.samples.modules.a1; + +public class HelloA1 { + private int i; + private HelloA1() { + + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + protected String getHello() { + return "hello"; + } +}
\ No newline at end of file diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures new file mode 100644 index 00000000000..7812e4167fb --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties new file mode 100644 index 00000000000..fcedab83843 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A2 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo new file mode 100644 index 00000000000..796d90cfad5 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo @@ -0,0 +1,20 @@ +package com.sonar.it.samples.modules.a2; + +public class HelloA2 { + + public HelloA2(int i) { + int j = i++; + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures new file mode 100644 index 00000000000..63df5add6d4 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures @@ -0,0 +1,2 @@ +ncloc:15 +classes:1 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_a/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_a/sonar-project.properties new file mode 100644 index 00000000000..7e6ca9074a4 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_a/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_a +sonar.projectName=Module A + +sonar.modules=module_a1,module_a2 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties new file mode 100644 index 00000000000..ca8404b7bd4 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module B1 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo new file mode 100644 index 00000000000..b83c3af128c --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b1; + +public class HelloB1 { + private int i; + private HelloB1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures new file mode 100644 index 00000000000..3947d3bdbff --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1
\ No newline at end of file diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties new file mode 100644 index 00000000000..e597dab4f33 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module B2 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo new file mode 100644 index 00000000000..20b8bb3876a --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b2; + +public class HelloB2 { + private int i; + private HelloB2() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures new file mode 100644 index 00000000000..3947d3bdbff --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1
\ No newline at end of file diff --git a/it/it-projects/measure/xoo-multi-modules-sample/module_b/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/module_b/sonar-project.properties new file mode 100644 index 00000000000..21d69f769d3 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/module_b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_b +sonar.projectName=Module B + +sonar.modules=module_b1,module_b2 diff --git a/it/it-projects/measure/xoo-multi-modules-sample/sonar-project.properties b/it/it-projects/measure/xoo-multi-modules-sample/sonar-project.properties new file mode 100644 index 00000000000..7935cb5ffb0 --- /dev/null +++ b/it/it-projects/measure/xoo-multi-modules-sample/sonar-project.properties @@ -0,0 +1,12 @@ +# Root project information +sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample +sonar.projectName=Sonar :: Integration Tests :: Multi-modules Sample +sonar.projectVersion=1.0-SNAPSHOT + +sonar.language=xoo + +# Some properties that will be inherited by the modules +sonar.sources=src/main/xoo + +# List of the module identifiers +sonar.modules=module_a,module_b diff --git a/it/it-projects/measure/xoo-sample/sonar-project.properties b/it/it-projects/measure/xoo-sample/sonar-project.properties new file mode 100644 index 00000000000..9e4aa0e3584 --- /dev/null +++ b/it/it-projects/measure/xoo-sample/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo b/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo.measures b/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..3f73ea8f695 --- /dev/null +++ b/it/it-projects/measure/xoo-sample/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,11 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 +duplicated_files:1 +duplicated_blocks:2 +duplicated_lines:3 diff --git a/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo index 41871e123a3..ad246dc8813 100644 --- a/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo +++ b/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo @@ -1,4 +1,4 @@ -package sample; +ackage sample; public class Sample { |