diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-16 13:51:30 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-20 12:59:15 +0200 |
commit | 73b46e381ff0a7a0b3bc280ac45de592e547513a (patch) | |
tree | a784542f624aa1a97be6f77eed75eda094be2166 /it/projects | |
parent | f20b8927e6b8747b37ae750de393215312b774c2 (diff) | |
download | sonar-scanner-cli-73b46e381ff0a7a0b3bc280ac45de592e547513a.tar.gz sonar-scanner-cli-73b46e381ff0a7a0b3bc280ac45de592e547513a.zip |
merge it-sonar-runner and update groupId
Diffstat (limited to 'it/projects')
56 files changed, 364 insertions, 0 deletions
diff --git a/it/projects/bad-source-dirs/sonar-project.properties b/it/projects/bad-source-dirs/sonar-project.properties new file mode 100644 index 0000000..55ff5ab --- /dev/null +++ b/it/projects/bad-source-dirs/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=bad-source-dirs +sonar.projectName=Bad Source Dirs +sonar.projectDescription=Bad Source Dirs +sonar.projectVersion=1.0 + +sonar.sources=src,bad diff --git a/it/projects/bad-source-dirs/src/Hello.java b/it/projects/bad-source-dirs/src/Hello.java new file mode 100644 index 0000000..1291f40 --- /dev/null +++ b/it/projects/bad-source-dirs/src/Hello.java @@ -0,0 +1,7 @@ +public class Hello { + + public void hello() { + int i=356; + if (true) i=5658; + } +} diff --git a/it/projects/basedir-with-source/Hello.java b/it/projects/basedir-with-source/Hello.java new file mode 100644 index 0000000..1291f40 --- /dev/null +++ b/it/projects/basedir-with-source/Hello.java @@ -0,0 +1,7 @@ +public class Hello { + + public void hello() { + int i=356; + if (true) i=5658; + } +} diff --git a/it/projects/basedir-with-source/sonar-project.properties b/it/projects/basedir-with-source/sonar-project.properties new file mode 100644 index 0000000..e5a74f8 --- /dev/null +++ b/it/projects/basedir-with-source/sonar-project.properties @@ -0,0 +1,7 @@ +# Note that the format of project key is still groupId:artifactId in order to support test with sonar 2.6. +sonar.projectKey=java:basedir-with-source +sonar.projectName=Basedir with source +sonar.projectDescription=The base directory contains sources (see the parameter 'sources') +sonar.projectVersion=1.0 + +sonar.sources=. diff --git a/it/projects/java-bytecode/.sonar/findbugs-include.xml b/it/projects/java-bytecode/.sonar/findbugs-include.xml new file mode 100644 index 0000000..d4846f0 --- /dev/null +++ b/it/projects/java-bytecode/.sonar/findbugs-include.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated by SonarQube --> +<FindBugsFilter> + <Match> + <Bug pattern="DM_EXIT"/> + </Match> +</FindBugsFilter>
\ No newline at end of file diff --git a/it/projects/java-bytecode/.sonar/findbugs-result.xml b/it/projects/java-bytecode/.sonar/findbugs-result.xml new file mode 100644 index 0000000..0ae2961 --- /dev/null +++ b/it/projects/java-bytecode/.sonar/findbugs-result.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<BugCollection version="3.0.1" sequence="0" timestamp="1432107278000" analysisTimestamp="1437046750473" release=""> + <Project> + <Jar>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/src/HasFindbugsViolation.java</Jar> + <Jar>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/build/classes/HasFindbugsViolation.class</Jar> + <AuxClasspathEntry>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/build/classes</AuxClasspathEntry> + <AuxClasspathEntry>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/lib/deprecated.jar</AuxClasspathEntry> + <AuxClasspathEntry>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/.sonar/findbugs/annotations.jar</AuxClasspathEntry> + <AuxClasspathEntry>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/.sonar/findbugs/jsr305.jar</AuxClasspathEntry> + <WrkDir>/home/duartem/git/sonar-tests-core/it-sonar-runner/projects/java-bytecode/.sonar</WrkDir> + </Project> + <BugInstance type="DM_EXIT" priority="2" rank="16" abbrev="Dm" category="BAD_PRACTICE" instanceHash="fc6ac81278eca1b0ea92d10f13e0a9e9" instanceOccurrenceNum="0" instanceOccurrenceMax="0" cweid="382"> + <ShortMessage>Method invokes System.exit(...)</ShortMessage> + <LongMessage>HasFindbugsViolation.use() invokes System.exit(...), which shuts down the entire virtual machine</LongMessage> + <Class classname="HasFindbugsViolation" primary="true"> + <SourceLine classname="HasFindbugsViolation" start="1" end="12" sourcefile="HasFindbugsViolation.java" sourcepath="HasFindbugsViolation.java"> + <Message>At HasFindbugsViolation.java:[lines 1-12]</Message> + </SourceLine> + <Message>In class HasFindbugsViolation</Message> + </Class> + <Method classname="HasFindbugsViolation" name="use" signature="()V" isStatic="false" primary="true"> + <SourceLine classname="HasFindbugsViolation" start="6" end="8" startBytecode="0" endBytecode="65" sourcefile="HasFindbugsViolation.java" sourcepath="HasFindbugsViolation.java"/> + <Message>In method HasFindbugsViolation.use()</Message> + </Method> + <SourceLine classname="HasFindbugsViolation" primary="true" start="7" end="7" startBytecode="12" endBytecode="12" sourcefile="HasFindbugsViolation.java" sourcepath="HasFindbugsViolation.java"> + <Message>At HasFindbugsViolation.java:[line 7]</Message> + </SourceLine> + </BugInstance> + <BugCategory category="BAD_PRACTICE"> + <Description>Bad practice</Description> + </BugCategory> + <BugPattern type="DM_EXIT" abbrev="Dm" category="BAD_PRACTICE" cweid="382"> + <ShortDescription>Method invokes System.exit(...)</ShortDescription> + <Details><![CDATA[ + + <p> Invoking System.exit shuts down the entire Java virtual machine. This + should only been done when it is appropriate. Such calls make it + hard or impossible for your code to be invoked by other code. + Consider throwing a RuntimeException instead.</p> + + ]]></Details> + </BugPattern> + <BugCode abbrev="Dm"> + <Description>Dubious method used</Description> + </BugCode> + <Errors errors="0" missingClasses="0"></Errors> + <FindBugsSummary timestamp="Wed, 20 May 2015 09:34:38 +0200" total_classes="1" referenced_classes="13" total_bugs="1" total_size="11" num_packages="1" java_version="1.7.0_79" vm_version="24.79-b02" cpu_seconds="3.30" clock_seconds="1.10" peak_mbytes="227.75" alloc_mbytes="3538.00" gc_seconds="0.02" priority_2="1"> + <FileStats path="HasFindbugsViolation.java" bugCount="1" size="11" bugHash="74a612ed42a469c4b358a80c33515967"/> + <PackageStats package="" total_bugs="1" total_types="1" total_size="11" priority_2="1"> + <ClassStats class="HasFindbugsViolation" sourceFile="HasFindbugsViolation.java" interface="false" size="11" bugs="1" priority_2="1"/> + </PackageStats> + <FindBugsProfile> + <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine" totalMilliseconds="224" invocations="320" avgMicrosecondsPerInvocation="700" maxMicrosecondsPerInvocation="17955" standardDeviationMircosecondsPerInvocation="1606"/> + <ClassProfile name="edu.umd.cs.findbugs.detect.FieldItemSummary" totalMilliseconds="67" invocations="13" avgMicrosecondsPerInvocation="5161" maxMicrosecondsPerInvocation="13026" standardDeviationMircosecondsPerInvocation="5212"/> + <ClassProfile name="edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory" totalMilliseconds="57" invocations="56" avgMicrosecondsPerInvocation="1018" maxMicrosecondsPerInvocation="4755" standardDeviationMircosecondsPerInvocation="939"/> + <ClassProfile name="edu.umd.cs.findbugs.detect.FindNoSideEffectMethods" totalMilliseconds="41" invocations="13" avgMicrosecondsPerInvocation="3202" maxMicrosecondsPerInvocation="12613" standardDeviationMircosecondsPerInvocation="3864"/> + <ClassProfile name="edu.umd.cs.findbugs.util.TopologicalSort" totalMilliseconds="36" invocations="288" avgMicrosecondsPerInvocation="127" maxMicrosecondsPerInvocation="1297" standardDeviationMircosecondsPerInvocation="215"/> + <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine" totalMilliseconds="34" invocations="321" avgMicrosecondsPerInvocation="105" maxMicrosecondsPerInvocation="458" standardDeviationMircosecondsPerInvocation="52"/> + <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.MethodGenFactory" totalMilliseconds="28" invocations="3" avgMicrosecondsPerInvocation="9462" maxMicrosecondsPerInvocation="27862" standardDeviationMircosecondsPerInvocation="13010"/> + <ClassProfile name="edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine" totalMilliseconds="25" invocations="28" avgMicrosecondsPerInvocation="925" maxMicrosecondsPerInvocation="11951" standardDeviationMircosecondsPerInvocation="2278"/> + <ClassProfile name="edu.umd.cs.findbugs.detect.NoteDirectlyRelevantTypeQualifiers" totalMilliseconds="23" invocations="13" avgMicrosecondsPerInvocation="1779" maxMicrosecondsPerInvocation="5478" standardDeviationMircosecondsPerInvocation="1779"/> + <ClassProfile name="edu.umd.cs.findbugs.detect.FunctionsThatMightBeMistakenForProcedures" totalMilliseconds="22" invocations="13" avgMicrosecondsPerInvocation="1761" maxMicrosecondsPerInvocation="5446" standardDeviationMircosecondsPerInvocation="1973"/> + <ClassProfile name="edu.umd.cs.findbugs.detect.BuildStringPassthruGraph" totalMilliseconds="17" invocations="13" avgMicrosecondsPerInvocation="1358" maxMicrosecondsPerInvocation="3601" standardDeviationMircosecondsPerInvocation="1349"/> + </FindBugsProfile> + </FindBugsSummary> + <ClassFeatures></ClassFeatures> + <History></History> +</BugCollection> diff --git a/it/projects/java-bytecode/build.xml b/it/projects/java-bytecode/build.xml new file mode 100644 index 0000000..d24c2b8 --- /dev/null +++ b/it/projects/java-bytecode/build.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Java Bytecode" default="all" basedir="." xmlns:sonar="antlib:org.sonar.ant"> + + <property name="lib.dir" value="../ant-libs"/> + + <property name="build.dir" value="build"/> + + <property name="classes.dir" value="${build.dir}/classes"/> + + <path id="classpath"> + <fileset dir="./lib" includes="*.jar" /> + </path> + + <target name="clean" description="Remove all files created by the build process."> + <delete dir="${build.dir}" /> + </target> + + <target name="init"> + <mkdir dir="${build.dir}" /> + <mkdir dir="${classes.dir}" /> + </target> + + <target name="compile" depends="init"> + <javac destdir="${classes.dir}" classpathref="classpath" fork="true" debug="true" includeAntRuntime="false"> + <src path="src"/> + </javac> + </target> + + <target name="all" + depends="clean,compile" /> + +</project> diff --git a/it/projects/java-bytecode/build/classes/HasFindbugsViolation.class b/it/projects/java-bytecode/build/classes/HasFindbugsViolation.class Binary files differnew file mode 100644 index 0000000..f482325 --- /dev/null +++ b/it/projects/java-bytecode/build/classes/HasFindbugsViolation.class diff --git a/it/projects/java-bytecode/lib/deprecated.jar b/it/projects/java-bytecode/lib/deprecated.jar Binary files differnew file mode 100644 index 0000000..65e3be9 --- /dev/null +++ b/it/projects/java-bytecode/lib/deprecated.jar diff --git a/it/projects/java-bytecode/sonar-project.properties b/it/projects/java-bytecode/sonar-project.properties new file mode 100644 index 0000000..cf6eb18 --- /dev/null +++ b/it/projects/java-bytecode/sonar-project.properties @@ -0,0 +1,9 @@ +# Note that the format of project key is still groupId:artifactId in order to support test with sonar 2.6. +sonar.projectKey=java:bytecode +sonar.projectName=Java Bytecode Sample +sonar.projectVersion=1.0 +sonar.profile=With Findbugs + +sonar.sources=src +sonar.binaries=build/classes +sonar.libraries=lib/*.jar diff --git a/it/projects/java-bytecode/src/HasFindbugsViolation.java b/it/projects/java-bytecode/src/HasFindbugsViolation.java new file mode 100644 index 0000000..c68f54f --- /dev/null +++ b/it/projects/java-bytecode/src/HasFindbugsViolation.java @@ -0,0 +1,13 @@ +public class HasFindbugsViolation { + + private String field; + + public void use() { + new DeprecatedExample().deprecatedMethod(); // violation of squid rule: CallToDeprecatedMethod + System.exit(33); // violation on findbugs rule: DM_EXIT + } + + public void useFieldForLcom4() { + System.out.println(field); + } +} diff --git a/it/projects/java-sample/sonar-project.properties b/it/projects/java-sample/sonar-project.properties new file mode 100644 index 0000000..0414efd --- /dev/null +++ b/it/projects/java-sample/sonar-project.properties @@ -0,0 +1,7 @@ +# Note that the format of project key is still groupId:artifactId in order to support test with sonar 2.6. +sonar.projectKey=java:sample +sonar.projectName=Java Sample, with comma +sonar.projectDescription=This is a Java sample +sonar.projectVersion=1.2.3 + +sonar.sources=src diff --git a/it/projects/java-sample/src/basic/Hello.java b/it/projects/java-sample/src/basic/Hello.java new file mode 100644 index 0000000..b9db5a0 --- /dev/null +++ b/it/projects/java-sample/src/basic/Hello.java @@ -0,0 +1,9 @@ +package basic; + +public class Hello { + + public void hello() { + int i=356; + if (true) i=5658; + } +} diff --git a/it/projects/java-sample/src/basic/World.java b/it/projects/java-sample/src/basic/World.java new file mode 100644 index 0000000..c65d91c --- /dev/null +++ b/it/projects/java-sample/src/basic/World.java @@ -0,0 +1,8 @@ +package basic; + +public final class World { + + public void world() { + System.out.println("hello world"); + } +} diff --git a/it/projects/multi-module/advanced/using-config-file-prop/module1/src/Hello.java b/it/projects/multi-module/advanced/using-config-file-prop/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/advanced/using-config-file-prop/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/advanced/using-config-file-prop/module1/temp/generated-sonar-project.properties b/it/projects/multi-module/advanced/using-config-file-prop/module1/temp/generated-sonar-project.properties new file mode 100644 index 0000000..81dd0e0 --- /dev/null +++ b/it/projects/multi-module/advanced/using-config-file-prop/module1/temp/generated-sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectName=Module 1 +sonar.projectBaseDir=.. diff --git a/it/projects/multi-module/advanced/using-config-file-prop/module2/src/Hello.java b/it/projects/multi-module/advanced/using-config-file-prop/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/advanced/using-config-file-prop/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/advanced/using-config-file-prop/module2/temp/generated-sonar-project.properties b/it/projects/multi-module/advanced/using-config-file-prop/module2/temp/generated-sonar-project.properties new file mode 100644 index 0000000..0b0e342 --- /dev/null +++ b/it/projects/multi-module/advanced/using-config-file-prop/module2/temp/generated-sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectName=Module 2 +sonar.projectBaseDir=..
\ No newline at end of file diff --git a/it/projects/multi-module/advanced/using-config-file-prop/sonar-project.properties b/it/projects/multi-module/advanced/using-config-file-prop/sonar-project.properties new file mode 100644 index 0000000..448cf40 --- /dev/null +++ b/it/projects/multi-module/advanced/using-config-file-prop/sonar-project.properties @@ -0,0 +1,10 @@ +sonar.projectKey=using-config-file-prop +sonar.projectName=Advanced use case - mostly used by the Ant task +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module2 + +module1.sonar.projectConfigFile=module1/temp/generated-sonar-project.properties +module2.sonar.projectConfigFile=module2/temp/generated-sonar-project.properties diff --git a/it/projects/multi-module/customization/deep-path-for-modules/modules/module1/src/Hello.java b/it/projects/multi-module/customization/deep-path-for-modules/modules/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/deep-path-for-modules/modules/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/deep-path-for-modules/modules/module2/src/Hello.java b/it/projects/multi-module/customization/deep-path-for-modules/modules/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/deep-path-for-modules/modules/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/deep-path-for-modules/sonar-project.properties b/it/projects/multi-module/customization/deep-path-for-modules/sonar-project.properties new file mode 100644 index 0000000..e366eaa --- /dev/null +++ b/it/projects/multi-module/customization/deep-path-for-modules/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=deep-path-for-modules +sonar.projectName=Project with deep path for modules +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=mod1,mod2 + +mod1.sonar.projectBaseDir=modules/module1 +mod1.sonar.projectName=Module 1 + +mod2.sonar.projectBaseDir=modules/module2 +mod2.sonar.projectName=Module 2
\ No newline at end of file diff --git a/it/projects/multi-module/customization/module-path-with-space/my module 1/src/Hello.java b/it/projects/multi-module/customization/module-path-with-space/my module 1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/module-path-with-space/my module 1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/module-path-with-space/my module 2/src/Hello.java b/it/projects/multi-module/customization/module-path-with-space/my module 2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/module-path-with-space/my module 2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/module-path-with-space/sonar-project.properties b/it/projects/multi-module/customization/module-path-with-space/sonar-project.properties new file mode 100644 index 0000000..4a2c774 --- /dev/null +++ b/it/projects/multi-module/customization/module-path-with-space/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=module-path-with-space +sonar.projectName=Project with module path that contain spaces +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module2 + +# module1 and module2 are located in a path that differs from their id AND that contains a space +module1.sonar.projectName=Module 1 +module1.sonar.projectBaseDir=my module 1 + +module2.sonar.projectName=Module 2 +module2.sonar.projectBaseDir=my module 2 diff --git a/it/projects/multi-module/customization/overwriting-parent-properties/module1/src1/Hello.java b/it/projects/multi-module/customization/overwriting-parent-properties/module1/src1/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/overwriting-parent-properties/module1/src1/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/overwriting-parent-properties/module2/sonar-project.properties b/it/projects/multi-module/customization/overwriting-parent-properties/module2/sonar-project.properties new file mode 100644 index 0000000..19d46fb --- /dev/null +++ b/it/projects/multi-module/customization/overwriting-parent-properties/module2/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module2-new-key +sonar.projectName=Module 2 +sonar.projectDescription=Description of module 2 +sonar.sources=src2 diff --git a/it/projects/multi-module/customization/overwriting-parent-properties/module2/src2/Hello.java b/it/projects/multi-module/customization/overwriting-parent-properties/module2/src2/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/customization/overwriting-parent-properties/module2/src2/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/customization/overwriting-parent-properties/sonar-project.properties b/it/projects/multi-module/customization/overwriting-parent-properties/sonar-project.properties new file mode 100644 index 0000000..b2dff8d --- /dev/null +++ b/it/projects/multi-module/customization/overwriting-parent-properties/sonar-project.properties @@ -0,0 +1,16 @@ +sonar.projectKey=overwriting-parent-properties +sonar.projectName=Project with modules that overwrite properties +sonar.projectVersion=1.2.3 +sonar.projectDescription=Description of root project + +sonar.sources=src + +sonar.modules=module1,module2 + +# For module 1, we overwrite properties here +module1.sonar.projectKey=module1-new-key +module1.sonar.projectName=Module 1 +module1.sonar.projectDescription=Description of module 1 +module1.sonar.sources=src1 + +# For module 2, we do it in the "sonar-project.properties" defined in the module diff --git a/it/projects/multi-module/failures/unexisting-base-dir/module1/src/Hello.java b/it/projects/multi-module/failures/unexisting-base-dir/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-base-dir/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/failures/unexisting-base-dir/module2/src/Hello.java b/it/projects/multi-module/failures/unexisting-base-dir/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-base-dir/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/failures/unexisting-base-dir/sonar-project.properties b/it/projects/multi-module/failures/unexisting-base-dir/sonar-project.properties new file mode 100644 index 0000000..8bb89b7 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-base-dir/sonar-project.properties @@ -0,0 +1,10 @@ +sonar.projectKey=unexisting-base-dir +sonar.projectName=Project with unexisting base directory for module +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module3 + +module1.sonar.projectName=Module 1 +module3.sonar.projectName=Module 3 diff --git a/it/projects/multi-module/failures/unexisting-config-file/module1/src/Hello.java b/it/projects/multi-module/failures/unexisting-config-file/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-config-file/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/failures/unexisting-config-file/module1/temp/empty-dir.txt b/it/projects/multi-module/failures/unexisting-config-file/module1/temp/empty-dir.txt new file mode 100644 index 0000000..0026da6 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-config-file/module1/temp/empty-dir.txt @@ -0,0 +1 @@ +File to be sure that SVN keeps this "empty" directory
\ No newline at end of file diff --git a/it/projects/multi-module/failures/unexisting-config-file/module2/src/Hello.java b/it/projects/multi-module/failures/unexisting-config-file/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-config-file/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/failures/unexisting-config-file/module2/temp/generated-sonar-project.properties b/it/projects/multi-module/failures/unexisting-config-file/module2/temp/generated-sonar-project.properties new file mode 100644 index 0000000..0b0e342 --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-config-file/module2/temp/generated-sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectName=Module 2 +sonar.projectBaseDir=..
\ No newline at end of file diff --git a/it/projects/multi-module/failures/unexisting-config-file/sonar-project.properties b/it/projects/multi-module/failures/unexisting-config-file/sonar-project.properties new file mode 100644 index 0000000..d3f7d6e --- /dev/null +++ b/it/projects/multi-module/failures/unexisting-config-file/sonar-project.properties @@ -0,0 +1,10 @@ +sonar.projectKey=unexisting-config-file +sonar.projectName=Project using an unexisting config file +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module2 + +module1.sonar.projectConfigFile=module1/temp/generated-sonar-project.properties +module2.sonar.projectConfigFile=module2/temp/generated-sonar-project.properties diff --git a/it/projects/multi-module/multi-language/sonar-project.properties b/it/projects/multi-module/multi-language/sonar-project.properties new file mode 100644 index 0000000..3598e57 --- /dev/null +++ b/it/projects/multi-module/multi-language/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=multi-language +sonar.projectName=Simplest multi-language project +sonar.projectVersion=1.2.3 + + +sonar.modules=java-module,js-module + +java-module.sonar.language=java +java-module.sonar.projectBaseDir=. +java-module.sonar.sources=src/main/java + +js-module.sonar.language=js +js-module.sonar.projectBaseDir=. +js-module.sonar.sources=src/main/js diff --git a/it/projects/multi-module/multi-language/src/main/java/Hello.java b/it/projects/multi-module/multi-language/src/main/java/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/multi-language/src/main/java/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/multi-language/src/main/js/Hello.js b/it/projects/multi-module/multi-language/src/main/js/Hello.js new file mode 100644 index 0000000..2096104 --- /dev/null +++ b/it/projects/multi-module/multi-language/src/main/js/Hello.js @@ -0,0 +1,3 @@ +function hello() { + alert("Hello World"); +} diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/sonar-project.properties b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/sonar-project.properties new file mode 100644 index 0000000..f5e701d --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/sonar-project.properties @@ -0,0 +1,2 @@ +# no need to set the "sonar.projectKey": it defaults to the module ID ('module1') +# no need to set the "sonar.projectName": it defaults to the module ID ('module1')
\ No newline at end of file diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/src/Hello.java b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/sonar-project.properties b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/sonar-project.properties new file mode 100644 index 0000000..93a6c21 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/sonar-project.properties @@ -0,0 +1,3 @@ +# here, we overwrite "sonar.projectKey" and "sonar.projectName" for 'module2' +sonar.projectKey=overridden-key-for-module2 +sonar.projectName=Module 2
\ No newline at end of file diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/src/Hello.java b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/sonar-project.properties b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/sonar-project.properties new file mode 100644 index 0000000..6bfae93 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.projectKey=simplest-with-props-each-module +sonar.projectName=Simplest multi-module project with properties set on each module +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module2
\ No newline at end of file diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-each-module/src/placeholder.txt b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/src/placeholder.txt new file mode 100644 index 0000000..1a5bdeb --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-each-module/src/placeholder.txt @@ -0,0 +1 @@ +The root module contains a src folder but it will not be analysed (SONARPLUGINS-2295) and a warning will be displayed.
\ No newline at end of file diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-root/module1/src/Hello.java b/it/projects/multi-module/simplest/simplest-with-props-on-root/module1/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-root/module1/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-root/module2/src/Hello.java b/it/projects/multi-module/simplest/simplest-with-props-on-root/module2/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-root/module2/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/multi-module/simplest/simplest-with-props-on-root/sonar-project.properties b/it/projects/multi-module/simplest/simplest-with-props-on-root/sonar-project.properties new file mode 100644 index 0000000..a3488b8 --- /dev/null +++ b/it/projects/multi-module/simplest/simplest-with-props-on-root/sonar-project.properties @@ -0,0 +1,11 @@ +sonar.projectKey=simplest-with-props-on-root +sonar.projectName=Simplest multi-module project with all properties set on the root project +sonar.projectVersion=1.2.3 + +sonar.sources=src + +sonar.modules=module1,module2 + +# no need to set the "sonar.projectBaseDir": it also defaults to <current_dir>/<module_ID> +# no need to set the "sonar.projectKey": it defaults to the module ID ('module1') +# no need to set the "sonar.projectName": it defaults to the module ID ('module1')
\ No newline at end of file diff --git a/it/projects/override-working-dir/sonar-project.properties b/it/projects/override-working-dir/sonar-project.properties new file mode 100644 index 0000000..fc08f05 --- /dev/null +++ b/it/projects/override-working-dir/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=override-working-dir +sonar.projectName=Override working dir +sonar.projectVersion=1.0-SNAPSHOT + +sonar.sources=src diff --git a/it/projects/override-working-dir/src/Hello.java b/it/projects/override-working-dir/src/Hello.java new file mode 100644 index 0000000..1291f40 --- /dev/null +++ b/it/projects/override-working-dir/src/Hello.java @@ -0,0 +1,7 @@ +public class Hello { + + public void hello() { + int i=356; + if (true) i=5658; + } +} diff --git a/it/projects/using-deprecated-props/build/Hello.class b/it/projects/using-deprecated-props/build/Hello.class Binary files differnew file mode 100644 index 0000000..48df723 --- /dev/null +++ b/it/projects/using-deprecated-props/build/Hello.class diff --git a/it/projects/using-deprecated-props/lib/deprecated.jar b/it/projects/using-deprecated-props/lib/deprecated.jar Binary files differnew file mode 100644 index 0000000..65e3be9 --- /dev/null +++ b/it/projects/using-deprecated-props/lib/deprecated.jar diff --git a/it/projects/using-deprecated-props/sonar-project.properties b/it/projects/using-deprecated-props/sonar-project.properties new file mode 100644 index 0000000..628eaf7 --- /dev/null +++ b/it/projects/using-deprecated-props/sonar-project.properties @@ -0,0 +1,8 @@ +sonar.projectKey=using-deprecated-props +sonar.projectName=Deprecated Props +sonar.projectVersion=1.2.3 + +sources=src +tests=tests +binaries=build +libraries=lib/*.jar diff --git a/it/projects/using-deprecated-props/src/Hello.java b/it/projects/using-deprecated-props/src/Hello.java new file mode 100644 index 0000000..8a94806 --- /dev/null +++ b/it/projects/using-deprecated-props/src/Hello.java @@ -0,0 +1,2 @@ +public class Hello { +} diff --git a/it/projects/using-deprecated-props/tests/HelloTest.java b/it/projects/using-deprecated-props/tests/HelloTest.java new file mode 100644 index 0000000..7cb87ed --- /dev/null +++ b/it/projects/using-deprecated-props/tests/HelloTest.java @@ -0,0 +1,2 @@ +public class HelloTest { +} |