diff --git a/.checkstyle b/.checkstyle deleted file mode 100644 index a5f3e7078fdbc5ca16d8cbdb3104bdd9f584f3a4..0000000000000000000000000000000000000000 --- a/.checkstyle +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false"> - <local-check-config name="Kieker Checkstyle" location="conf/cs-conf.xml" type="project" description=""> - <additional-data name="protect-config-file" value="false"/> - </local-check-config> - <fileset name="all" enabled="true" check-config-name="Kieker Checkstyle" local="true"> - <file-match-pattern match-pattern="." include-pattern="true"/> - </fileset> - <filter name="FilesFromPackage" enabled="true"> - <filter-data value="examples/userguide/ch2--bookstore-application/src"/> - <filter-data value="examples/userguide/ch2--manual-instrumentation/src"/> - <filter-data value="examples/userguide/ch3-4--custom-components/src"/> - <filter-data value="examples/userguide/ch5--trace-monitoring-aspectj/src"/> - <filter-data value="examples/userguide/appendix-JMS/src"/> - <filter-data value="examples/userguide/appendix-Sigar/src"/> - <filter-data value="src-gen/analysis"/> - </filter> -</fileset-config> diff --git a/.eclipse-pmd b/.eclipse-pmd deleted file mode 100644 index 2145398a5d81976cf7ce9f86c77c66aafd725ed7..0000000000000000000000000000000000000000 --- a/.eclipse-pmd +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<eclipse-pmd xmlns="http://acanda.ch/eclipse-pmd/0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acanda.ch/eclipse-pmd/0.8 http://acanda.ch/eclipse-pmd/eclipse-pmd-0.8.xsd"> - <analysis enabled="false" /> - <rulesets> - <ruleset name="kieker" ref="lib/static-analysis/pmd-5.0.5/pmdrules.xml" refcontext="project" /> - </rulesets> -</eclipse-pmd> \ No newline at end of file diff --git a/.fbExcludeFilterFile b/.fbExcludeFilterFile new file mode 100644 index 0000000000000000000000000000000000000000..726f5121d80174c6e73db7f766634b58102f0e2c --- /dev/null +++ b/.fbExcludeFilterFile @@ -0,0 +1,3 @@ +<FindBugsFilter> + +</FindBugsFilter> \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.pmd b/.pmd deleted file mode 100644 index 83a0fddff8a8d015d86b2fcc24004f3364080617..0000000000000000000000000000000000000000 --- a/.pmd +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<pmd> - <useProjectRuleSet>true</useProjectRuleSet> - <ruleSetFile>lib/static-analysis/pmd-5.0.5/pmdrules.xml</ruleSetFile> - <includeDerivedFiles>false</includeDerivedFiles> - <violationsAsErrors>true</violationsAsErrors> - <fullBuildEnabled>true</fullBuildEnabled> -</pmd> diff --git a/.project b/.project index bdb6e353c82e61b1761c5b0672ba7e965d124c1d..a7cba2328298cc8f3d7cde2458cf09a79c0b8992 100644 --- a/.project +++ b/.project @@ -10,6 +10,21 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name> + <arguments> + </arguments> + </buildCommand> <buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> @@ -19,5 +34,8 @@ <natures> <nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> + <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature> </natures> </projectDescription> diff --git a/.settings/edu.umd.cs.findbugs.core.prefs b/.settings/edu.umd.cs.findbugs.core.prefs index b23edba75a37c69528f5ce878d28ff5fa0eb64a8..125fa1c18f565e54deea709211100a051c7270e4 100644 --- a/.settings/edu.umd.cs.findbugs.core.prefs +++ b/.settings/edu.umd.cs.findbugs.core.prefs @@ -1,137 +1,8 @@ #FindBugs User Preferences -#Thu Oct 16 13:15:38 CEST 2014 -cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud -detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true -detectorAtomicityProblem=AtomicityProblem|true -detectorBadAppletConstructor=BadAppletConstructor|false -detectorBadResultSetAccess=BadResultSetAccess|true -detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true -detectorBadUseOfReturnValue=BadUseOfReturnValue|true -detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true -detectorBooleanReturnNull=BooleanReturnNull|true -detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false -detectorCheckExpectedWarnings=CheckExpectedWarnings|false -detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true -detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true -detectorCheckTypeQualifiers=CheckTypeQualifiers|true -detectorCloneIdiom=CloneIdiom|true -detectorComparatorIdiom=ComparatorIdiom|true -detectorConfusedInheritance=ConfusedInheritance|true -detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true -detectorCrossSiteScripting=CrossSiteScripting|true -detectorDefaultEncodingDetector=DefaultEncodingDetector|true -detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true -detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true -detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true -detectorDontUseEnum=DontUseEnum|true -detectorDroppedException=DroppedException|true -detectorDumbMethodInvocations=DumbMethodInvocations|true -detectorDumbMethods=DumbMethods|true -detectorDuplicateBranches=DuplicateBranches|true -detectorEmptyZipFileEntry=EmptyZipFileEntry|false -detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true -detectorExplicitSerialization=ExplicitSerialization|true -detectorFinalizerNullsFields=FinalizerNullsFields|true -detectorFindBadCast2=FindBadCast2|true -detectorFindBadForLoop=FindBadForLoop|true -detectorFindCircularDependencies=FindCircularDependencies|false -detectorFindDeadLocalStores=FindDeadLocalStores|true -detectorFindDoubleCheck=FindDoubleCheck|true -detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true -detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true -detectorFindFinalizeInvocations=FindFinalizeInvocations|true -detectorFindFloatEquality=FindFloatEquality|true -detectorFindHEmismatch=FindHEmismatch|true -detectorFindInconsistentSync2=FindInconsistentSync2|true -detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true -detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true -detectorFindMaskedFields=FindMaskedFields|true -detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true -detectorFindNakedNotify=FindNakedNotify|true -detectorFindNonShortCircuit=FindNonShortCircuit|true -detectorFindNullDeref=FindNullDeref|true -detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true -detectorFindOpenStream=FindOpenStream|true -detectorFindPuzzlers=FindPuzzlers|true -detectorFindRefComparison=FindRefComparison|true -detectorFindReturnRef=FindReturnRef|true -detectorFindRoughConstants=FindRoughConstants|true -detectorFindRunInvocations=FindRunInvocations|true -detectorFindSelfComparison=FindSelfComparison|true -detectorFindSelfComparison2=FindSelfComparison2|true -detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true -detectorFindSpinLoop=FindSpinLoop|true -detectorFindSqlInjection=FindSqlInjection|true -detectorFindTwoLockWait=FindTwoLockWait|true -detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true -detectorFindUnconditionalWait=FindUnconditionalWait|true -detectorFindUninitializedGet=FindUninitializedGet|true -detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true -detectorFindUnreleasedLock=FindUnreleasedLock|true -detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true -detectorFindUnsyncGet=FindUnsyncGet|true -detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true -detectorFindUselessControlFlow=FindUselessControlFlow|true -detectorFormatStringChecker=FormatStringChecker|true -detectorHugeSharedStringConstants=HugeSharedStringConstants|true -detectorIDivResultCastToDouble=IDivResultCastToDouble|true -detectorIncompatMask=IncompatMask|true -detectorInconsistentAnnotations=InconsistentAnnotations|true -detectorInefficientIndexOf=InefficientIndexOf|true -detectorInefficientMemberAccess=InefficientMemberAccess|false -detectorInefficientToArray=InefficientToArray|true -detectorInfiniteLoop=InfiniteLoop|true -detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true -detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true -detectorInitializationChain=InitializationChain|true -detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true -detectorInstantiateStaticClass=InstantiateStaticClass|true -detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true -detectorInvalidJUnitTest=InvalidJUnitTest|true -detectorIteratorIdioms=IteratorIdioms|true -detectorLazyInit=LazyInit|true -detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true -detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true -detectorMethodReturnCheck=MethodReturnCheck|true -detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true -detectorMutableLock=MutableLock|true -detectorMutableStaticFields=MutableStaticFields|true -detectorNaming=Naming|true -detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true -detectorNumberConstructor=NumberConstructor|true -detectorOptionalReturnNull=OptionalReturnNull|true -detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true -detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true -detectorPublicSemaphores=PublicSemaphores|false -detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true -detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true -detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true -detectorRedundantInterfaces=RedundantInterfaces|true -detectorRepeatedConditionals=RepeatedConditionals|true -detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true -detectorSerializableIdiom=SerializableIdiom|true -detectorStartInConstructor=StartInConstructor|true -detectorStaticCalendarDetector=StaticCalendarDetector|true -detectorStringConcatenation=StringConcatenation|true -detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true -detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true -detectorSwitchFallthrough=SwitchFallthrough|true -detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true -detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true -detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true -detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true -detectorURLProblems=URLProblems|true -detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true -detectorUnnecessaryMath=UnnecessaryMath|true -detectorUnreadFields=UnreadFields|true -detectorUselessSubclassMethod=UselessSubclassMethod|false -detectorVarArgsProblems=VarArgsProblems|true -detectorVolatileUsage=VolatileUsage|true -detectorWaitInLoop=WaitInLoop|true -detectorWrongMapIterator=WrongMapIterator|true -detectorXMLFactoryBypass=XMLFactoryBypass|true -detector_threshold=2 -effort=default -filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false|15 -filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL| -run_at_full_build=false +#Thu Oct 16 15:50:06 CEST 2014 +detector_threshold=3 +effort=max +excludefilter0=.fbExcludeFilterFile|true +filter_settings=Low|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false|15 +filter_settings_neg=NOISE| +run_at_full_build=true diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 989609020a008e70c15d3ce12a3a1c835b80201c..29abf999564110a0d6aca109f55f439c72b7031c 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,5 +1,6 @@ eclipse.preferences.version=1 encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 encoding//src/test/resources=UTF-8 encoding/<project>=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 9db11560281da540dab2bc02b282ce037585556b..01a2d32d3c9af8841c22f1f1529adab9148bc35b 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,6 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.6 diff --git a/conf/cs-conf.xml b/conf/quality-config/cs-conf.xml similarity index 96% rename from conf/cs-conf.xml rename to conf/quality-config/cs-conf.xml index 950501a529875cad6f2e94e08c85be34e76d271a..abc40250ae3ee2096bc33bd415fa6aaca24c182a 100644 --- a/conf/cs-conf.xml +++ b/conf/quality-config/cs-conf.xml @@ -55,13 +55,13 @@ <!-- Checks that a source file begins with a specified header. !--> <!-- See http://checkstyle.sf.net/config_header.html !--> <!-- KIEKER !--> - <module name="Header"> - <!--<property name="headerFile" value=""/>--> - <!--<property name="charset" value=""/>--> - <property name="header" value="/***************************************************************************\n * Copyright 2013 Kieker Project (http://kieker-monitoring.net)\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n ***************************************************************************/\n"/> - <property name="ignoreLines" value="2"/> - <property name="fileExtensions" value="java"/> - </module> +<!-- <module name="Header"> --> +<!-- <property name="headerFile" value=""/> --> +<!-- <property name="charset" value=""/> --> +<!-- <property name="header" value="/***************************************************************************\n * Copyright 2013 Kieker Project (http://kieker-monitoring.net)\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n ***************************************************************************/\n"/> --> +<!-- <property name="ignoreLines" value="2"/> --> +<!-- <property name="fileExtensions" value="java"/> --> +<!-- </module> --> <!-- Checks the header of a source file against a header file that contains a regular expression !--> <!-- for each line of the source header. !--> @@ -173,26 +173,7 @@ --> <module name="TreeWalker"> - <!-- KIEKER --> <property name="tabWidth" value="4"/> - <!-- KIEKER --> - <module name="kieker.test.tools.cs.AnalysisComponentConstructorCheck"> - <property name="ignoreAbstractClasses" value="true"/> - <property name="severity" value="${checkstyle.ignoreCustomKieker}" default="ignore"/> - </module> - <module name="kieker.test.tools.cs.MonitoringRecordFactoryConventionCheck"> - <property name="ignoreAbstractClasses" value="true"/> - <property name="severity" value="${checkstyle.ignoreCustomKieker}" default="ignore"/> - </module> - <module name="kieker.test.tools.cs.MissingSinceTagCheck"> - <property name="severity" value="${checkstyle.ignoreCustomKieker}" default="ignore"/> - </module> - <module name="kieker.test.tools.cs.NotAllowedSinceTagCheck"> - <property name="severity" value="${checkstyle.ignoreCustomKieker}" default="ignore"/> - </module> - <module name="kieker.test.tools.cs.NoBlockCommentsCheck"> - <property name="severity" value="${checkstyle.ignoreCustomKieker}" default="ignore"/> - </module> <module name="FileContentsHolder"/> <!-- @@ -211,7 +192,6 @@ <!-- Verifies that both the java.lang.Deprecated import is present and the @deprecated Javadoc tag is present when either is present. !--> <!-- See http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated !--> - <!-- KIEKER --> <module name="MissingDeprecated"> <property name="severity" value="info"/> </module> @@ -247,14 +227,12 @@ !--> <!-- Finds nested blocks, i.e. blocks that are used freely in the code. !--> <!-- See http://checkstyle.sf.net/config_blocks.html !--> - <!-- KIEKER allowInSwitchCase !--> <module name="AvoidNestedBlocks"> <property name="allowInSwitchCase" value="true"/> </module> <!-- Checks for empty blocks. !--> <!-- See http://checkstyle.sf.net/config_blocks.html !--> - <!-- KIEKER removed LITERAL_CATCH !--> <module name="EmptyBlock"> <property name="option" value="stmt"/> <property name="tokens" value="LITERAL_DO, diff --git a/conf/quality-config/fb-filter.xml b/conf/quality-config/fb-filter.xml new file mode 100644 index 0000000000000000000000000000000000000000..726f5121d80174c6e73db7f766634b58102f0e2c --- /dev/null +++ b/conf/quality-config/fb-filter.xml @@ -0,0 +1,3 @@ +<FindBugsFilter> + +</FindBugsFilter> \ No newline at end of file diff --git a/conf/quality-config/pmdrules.xml b/conf/quality-config/pmdrules.xml new file mode 100644 index 0000000000000000000000000000000000000000..31db2532208ad0f8d008afad0654dab492b8394b --- /dev/null +++ b/conf/quality-config/pmdrules.xml @@ -0,0 +1,95 @@ +<?xml version="1.0"?> +<ruleset name="Kieker PMD ruleset" + xmlns="http://pmd.sf.net/ruleset/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> + <description> + This ruleset is checked for TeeTime automatically. + </description> + + <rule ref="rulesets/java/basic.xml"> + <exclude name="UnnecessaryFinalModifier"/> + </rule> + + <rule ref="rulesets/java/braces.xml"/> + + <rule ref="rulesets/java/clone.xml"/> + + <!--<rule ref="rulesets/codesize.xml">--> + + <rule ref="rulesets/java/controversial.xml"> + <exclude name="AvoidFinalLocalVariable"/> + <exclude name="AvoidLiteralsInIfCondition"/> + <exclude name="AvoidUsingVolatile"/> + <exclude name="CallSuperInConstructor"/> + <exclude name="DataflowAnomalyAnalysis"/> + <exclude name="OnlyOneReturn"/> + <exclude name="UnusedModifier"/> + <exclude name="UnnecessaryConstructor"/> + <exclude name="UseConcurrentHashMap"/> + <exclude name="AssignmentInOperand"/> + <exclude name="NullAssignment"/> + <exclude name="BooleanInversion"/> + </rule> + + <!--<rule ref="rulesets/coupling.xml">--> + + <rule ref="rulesets/java/design.xml"> + <exclude name="ConfusingTernary"/> + <exclude name="AvoidSynchronizedAtMethodLevel"/> + <exclude name="AbstractClassWithoutAbstractMethod"/> + <exclude name="GodClass"/> + </rule> + + <rule ref="rulesets/java/finalizers.xml"/> + + <rule ref="rulesets/java/imports.xml"/> + + <rule ref="rulesets/java/j2ee.xml"/> + + <rule ref="rulesets/java/junit.xml"/> + + <rule ref="rulesets/java/logging-jakarta-commons.xml"> + <exclude name="GuardLogStatement" /> + </rule> + + <rule ref="rulesets/java/migrating_to_13.xml"/> + <rule ref="rulesets/java/migrating_to_14.xml"/> + <rule ref="rulesets/java/migrating_to_15.xml"/> + <rule ref="rulesets/java/migrating_to_junit4.xml"/> + + <rule ref="rulesets/java/naming.xml"> + <exclude name="LongVariable"/> + <exclude name="PackageCase"/> + <exclude name="ShortVariable"/> + <exclude name="ShortClassName"/> + </rule> + + <rule ref="rulesets/java/optimizations.xml"> + <exclude name="AvoidInstantiatingObjectsInLoops"/> + </rule> + + <rule ref="rulesets/java/strictexception.xml"> + <exclude name="AvoidCatchingNPE"/> + <exclude name="AvoidThrowingNullPointerException"/> + <exclude name="SignatureDeclareThrowsException"/> + <exclude name="AvoidCatchingGenericException"/> + </rule> + + <rule ref="rulesets/java/strings.xml"> + <exclude name="AvoidDuplicateLiterals"/> + <exclude name="ConsecutiveAppendsShouldReuse"/> + </rule> + + <rule ref="rulesets/java/sunsecure.xml"/> + + <rule ref="rulesets/java/typeresolution.xml"> + <exclude name="SignatureDeclareThrowsException"/> + </rule> + + <rule ref="rulesets/java/unusedcode.xml"> + <exclude name="UnusedModifier"/> + </rule> + +</ruleset> \ No newline at end of file diff --git a/pom.xml b/pom.xml index c6d98d0ef17314de877f613cf3b3c822bf7e9161..12717c59b991b62743c990d6e55f14376e5b78fb 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <java.version>1.6</java.version> </properties> <repositories> @@ -82,8 +83,8 @@ <version>3.1</version> <configuration> - <source>1.6</source> - <target>1.6</target> + <source>${java.version}</source> + <target>${java.version}</target> </configuration> </plugin> @@ -101,7 +102,7 @@ <version>2.5</version> </plugin> - + <!-- <plugin> --> <!-- <groupId>org.apache.maven.plugins</groupId> --> @@ -118,9 +119,109 @@ <!-- <finalName>${project.artifactId}-${project.version}-with-dependencies</finalName> --> <!-- </configuration> --> <!-- </plugin> --> + + <!-- Checkstyle --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.13</version> + <executions> + <execution> + <phase>test</phase> + <configuration> + <configLocation>conf/quality-config/cs-conf.xml</configLocation> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <encoding>UTF-8</encoding> + <consoleOutput>true</consoleOutput> + <failsOnError>false</failsOnError> + <linkXRef>false</linkXRef> + </configuration> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- Findbugs --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>3.0.0</version> + <configuration> + <effort>Max</effort> + <threshold>Low</threshold> + <includeTests>true</includeTests> + <failOnError>false</failOnError> + <excludeFilterFile>${project.basedir}/conf/quality-config/fb-filter.xml</excludeFilterFile> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>findbugs</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- PMD --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>3.2</version> + + <configuration> + <rulesets> + <ruleset>${project.basedir}/conf/quality-config/pmdrules.xml</ruleset> + </rulesets> + <includeTests>true</includeTests> + <targetJdk>${java.version}</targetJdk> + <failOnError>false</failOnError> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>pmd</goal> + <goal>cpd</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> </build> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.13</version> + <reportSets> + <reportSet> + <reports> + <report>checkstyle</report> + </reports> + </reportSet> + </reportSets> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>3.0.0</version> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>3.2</version> + </plugin> + </plugins> + </reporting> + <profiles> <profile> <id>performancetest</id> diff --git a/run-configurations/ComparisonMethodcallWithPorts.launch b/run-configurations/ComparisonMethodcallWithPorts.launch index c5391996699e84d0ac1ab95bb6495293d3efdb62..2be0908c088fbcdcc87b190a4d547de431bbb181 100644 --- a/run-configurations/ComparisonMethodcallWithPorts.launch +++ b/run-configurations/ComparisonMethodcallWithPorts.launch @@ -14,5 +14,4 @@ <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="teetime.examples.ComparisonMethodcallWithPorts"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="teetime"/> -<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> </launchConfiguration>