diff --git a/build.gradle b/build.gradle index 583a5997bd18c66bd320d4ee47ac135babe10a66..43aee04b5662fe1f72d584b4ea7b8f07bdd075e9 100644 --- a/build.gradle +++ b/build.gradle @@ -45,11 +45,32 @@ dependencies { sourceSets.main.compileClasspath += configurations.providedCompile eclipse.classpath.plusConfigurations += [configurations.providedCompile] +apply plugin: 'pmd' +pmd { + ignoreFailures = true + + // Clear the rule set first. Otherwise we would have a lot of additional rules in our rule set. + // ruleSets = [] +} + +apply plugin: 'checkstyle' +checkstyle { + ignoreFailures = true + showViolations = false +} + +apply plugin: 'findbugs' +findbugs { + ignoreFailures = true + effort = "max" + reportLevel = "low" +} + def commonStartScriptConfiguration = { - mainClassName = project.mainClassName - applicationName = 'start' - outputDir = new File(project.buildDir, 'scripts') - classpath = jar.outputs.files + project.configurations.runtime + mainClassName = project.mainClassName + applicationName = 'start' + outputDir = new File(project.buildDir, 'scripts') + classpath = jar.outputs.files + project.configurations.runtime } task createStartScriptWinX86(type: CreateStartScripts) { @@ -90,7 +111,7 @@ task distBinWinX86(type: Zip, dependsOn: [jar, createStartScriptWinX86]) { } into('lib') { - from configurations.windowsX86Runtime + from configurations.windowsX86Runtime } } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000000000000000000000000000000000000..28e6790cb29c3ab9f8bdca00a3a8a4469fbbbd31 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> + +<module name="Checker"> + <module name="TreeWalker"> + <module name="AnnotationUseStyle"/> + <module name="MissingDeprecated"/> + <module name="MissingOverride"/> + <module name="PackageAnnotation"/> + <module name="SuppressWarnings"/> + + <module name="EmptyBlock"/> + <module name="LeftCurly"/> + <module name="NeedBraces"/> + <module name="RightCurly"/> + <module name="AvoidNestedBlocks"/> + + <module name="VisibilityModifier"/> + <module name="FinalClass"/> + <module name="InterfaceIsType"/> + <module name="HideUtilityClassConstructor"/> + <module name="DesignForExtension"/> + <module name="MutableException"/> + <module name="ThrowsCount"/> + <module name="InnerTypeLast"/> + + <module name="ArrayTrailingComma"/> + <module name="AvoidInlineConditionals"/> + <module name="CovariantEquals"/> + <module name="EmptyStatement"/> + <module name="EqualsAvoidNull"/> + <module name="EqualsHashCode"/> + <module name="FinalLocalVariable"/> + <module name="HiddenField"/> + <module name="IllegalInstantiation"/> + <module name="IllegalTokenText"/> + <module name="InnerAssignment"/> + <module name="MagicNumber"/> + <module name="MissingSwitchDefault"/> + <module name="ModifiedControlVariable"/> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="StringLiteralEquality"/> + <module name="NestedForDepth"/> + <module name="NestedIfDepth"/> + <module name="NestedTryDepth"/> + <module name="NoClone"/> + <module name="NoFinalizer"/> + <module name="SuperClone"/> + <module name="SuperFinalize"/> + <module name="IllegalCatch"/> + <module name="IllegalThrows"/> + <module name="PackageDeclaration"/> + <module name="ReturnCount"/> + <module name="IllegalType"/> + <module name="DeclarationOrder"/> + <module name="ParameterAssignment"/> + <module name="ExplicitInitialization"/> + <module name="DefaultComesLast"/> + <module name="MissingCtor"/> + <module name="FallThrough"/> + <module name="MultipleStringLiterals"/> + <module name="MultipleVariableDeclarations"/> + <module name="RequireThis"/> + <module name="UnnecessaryParentheses"/> + <module name="OneStatementPerLine"/> + + <module name="AvoidStarImport"/> + <module name="AvoidStaticImport"/> + <module name="IllegalImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + <module name="ImportOrder"/> + + <module name="JavadocType"/> + <module name="JavadocMethod"><property name="severity" value="info"/></module> + <module name="JavadocVariable"><property name="severity" value="info"/></module> + <module name="JavadocStyle"/> + + <module name="BooleanExpressionComplexity"/> + <module name="ClassDataAbstractionCoupling"/> + <module name="ClassFanOutComplexity"/> + <module name="CyclomaticComplexity"/> + <module name="NPathComplexity"/> + <module name="JavaNCSS"/> + + <module name="TodoComment"/> + <module name="UncommentedMain"/> + <module name="UpperEll"/> + <module name="ArrayTypeStyle"/> + <module name="FinalParameters"/> + <module name="DescendantToken"/> + <module name="TrailingComment"/> + <module name="OuterTypeFilename"/> + + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + + <module name="MemberName"/> + <module name="LocalVariableName"/> + <module name="TypeName"/> + <module name="MethodName"/> + <module name="AbstractClassName"/> + <module name="PackageName"/> + + <module name="ExecutableStatementCount"/> + <module name="LineLength"><property name="max" value="165"/></module> + <module name="MethodLength"/> + <module name="AnonInnerLength"/> + <module name="ParameterNumber"/> + <module name="OuterTypeNumber"/> + <module name="MethodCount"/> + + <module name="GenericWhitespace"/> + <module name="EmptyForInitializerPad"/> + <module name="EmptyForIteratorPad"/> + <module name="MethodParamPad"/> + <module name="NoWhitespaceAfter"/> + <module name="NoWhitespaceBefore"/> + <module name="OperatorWrap"/> + <module name="ParenPad"/> + <module name="TypecastParenPad"/> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"/> + </module> + + <module name="Header"> + <property name="header" value="/***************************************************************************\n * Copyright 2014 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="JavadocPackage"/> + + <module name="NewlineAtEndOfFile"/> + <module name="Translation"/> + <module name="UniqueProperties"/> + + <module name="FileLength"/> +</module> \ No newline at end of file