1. Kink Programming Language
  2. Untitled project
  3. kink

Commits

Taku Miyakawa  committed a565172

Java 8 as the least supported version (closing issue 439)

  • Participants
  • Parent commits 948a525
  • Branches default

Comments (0)

Files changed (8)

File README-ja.rst

View file
 ------
 ビルドするために必要なものは次のとおり。
 
-- JDK 1.7+
+- JDK 1.8+
 - Apache Ant 1.7+
 - Web 上のリポジトリへのアクセス (最初のビルドのみ)
 - MinGW C Compiler

File README.rst

View file
 -----
 To build files, required:
 
-- JDK 1.7+
+- JDK 1.8+
 - Apache Ant 1.7+
 - Access to repositories on the web (only for the first build)
 - MinGW C Compiler

File build.xml

View file
   <property environment="env" />
   <property file="${basedir}/build.properties" />
   <antversion property="antversion" />
-  <property name="jdk.version" value="1.7" />
+  <property name="jdk.version" value="1.8" />
   <property name="src.dir" location="${basedir}/src" />
   <property name="extern.dir" location="${basedir}/extern" />
   <property name="dest.dir" location="${basedir}/dest" />

File src/build/build_ivy.xml

View file
   <!-- VERSIONS -->
 
   <property name="ivy.ant.version" value="${antversion}" />
-  <property name="ivy.asm.version" value="4.1" />
+  <property name="ivy.asm.version" value="5.0_BETA" />
   <property name="ivy.slf4j.version" value="1.7.2" />
   <property name="ivy.logback.version" value="1.0.9" />
   <property name="ivy.commons-lang.version" value="2.6" />
   <property name="ivy.junit.version" value="4.10" /> 
   <property name="ivy.checkstyle.version" value="5.5" /> 
   <property name="ivy.jacoco.version" value="0.6.4.201312101107" /> 
-  <property name="ivy.pmd.version" value="4.3" /> 
+  <property name="ivy.pmd.version" value="5.1.0" /> 
 
   <!-- TARGETS -->
 

File src/build/build_pmd.xml

View file
       rulesetfiles="${src.dir}/build/pmd.xml"
       failonerror="true"
       failurespropertyname="temp.pmd.violated"
-      minimumpriority="5"
-      targetjdk="${jdk.version}">
+      minimumpriority="5">
       <formatter type="xml" tofile="${dest.dir}/pmd/pmd_result.xml" />
       <formatter type="text" tofile="${dest.dir}/pmd/pmd_result.txt" />
       <fileset dir="${src.dir}/main/java" includes="**/*.java" excludes="org/kink_lang/mantissa/**" />

File src/build/ivy.xml

View file
     <dependency org="org.jacoco" name="org.jacoco.ant"
       rev="${ivy.jacoco.version}" conf="jacoco->default" />
 
-    <dependency org="pmd" name="pmd" rev="${ivy.pmd.version}" conf="pmd->default" />
+    <dependency org="net.sourceforge.pmd" name="pmd" rev="${ivy.pmd.version}" conf="pmd->default" />
 
   </dependencies>
 

File src/build/pmd.xml

View file
 
 <ruleset
     name="pmd"
-    xmlns="http://pmd.sf.net/ruleset/1.0.0"
+    xmlns="http://pmd.sf.net/ruleset/2.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>
         PMD rulesets for Kink project.
     </description>
 
-    <rule ref="rulesets/basic.xml"/>
+    <rule ref="rulesets/java/basic.xml"/>
 
-    <rule ref="rulesets/braces.xml"/>
+    <rule ref="rulesets/java/braces.xml"/>
 
-    <rule ref="rulesets/imports.xml">
+    <rule ref="rulesets/java/imports.xml">
 
         <exclude name="TooManyStaticImports" />
     </rule>
 
-    <rule ref="rulesets/strings.xml">
+    <rule ref="rulesets/java/strings.xml">
 
         <exclude name="AvoidDuplicateLiterals" />
+
+        <!-- TODO enable it and improve the source code -->
+        <exclude name="ConsecutiveAppendsShouldReuse" />
+
+        <!-- TODO enable it and improve the source code -->
+        <exclude name="AppendCharacterWithChar" />
     </rule>
 
 
-    <rule ref="rulesets/unusedcode.xml">
+    <rule ref="rulesets/java/unusedcode.xml">
 
         <exclude name="UnusedFormalParameter" />
     </rule>
 
 
-    <rule ref="rulesets/design.xml/SimplifyBooleanReturns" />
-    <rule ref="rulesets/design.xml/SimplifyBooleanExpressions" />
-    <rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault" />
-    <rule ref="rulesets/design.xml/AvoidReassigningParameters" />
-    <rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod" />
-    <rule ref="rulesets/design.xml/AccessorClassGeneration" />
-    <rule ref="rulesets/design.xml/FinalFieldCouldBeStatic" />
-    <rule ref="rulesets/design.xml/CloseResource" />
-    <rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt" />
-    <rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement" />
-    <rule ref="rulesets/design.xml/OptimizableToArrayCall" />
-    <rule ref="rulesets/design.xml/BadComparison" />
-    <rule ref="rulesets/design.xml/IdempotentOperations" />
-    <rule ref="rulesets/design.xml/SimpleDateFormatNeedsLocale" />
-    <rule ref="rulesets/design.xml/ImmutableField" />
-    <rule ref="rulesets/design.xml/UseLocaleWithCaseConversions" />
-    <rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass" />
-    <rule ref="rulesets/design.xml/SimplifyConditional" />
-    <rule ref="rulesets/design.xml/AvoidConstantsInterface" />
-    <rule ref="rulesets/design.xml/UnsynchronizedStaticDateFormatter" />
-    <rule ref="rulesets/design.xml/PreserveStackTrace" />
-    <rule ref="rulesets/design.xml/UseCollectionIsEmpty" />
-    <rule ref="rulesets/design.xml/SingularField" />
-    <rule ref="rulesets/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
-    <rule ref="rulesets/design.xml/ReturnEmptyArrayRatherThanNull" />
+    <rule ref="rulesets/java/design.xml/SimplifyBooleanReturns" />
+    <rule ref="rulesets/java/design.xml/SimplifyBooleanExpressions" />
+    <rule ref="rulesets/java/design.xml/SwitchStmtsShouldHaveDefault" />
+    <rule ref="rulesets/java/design.xml/AvoidReassigningParameters" />
+    <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod" />
+    <rule ref="rulesets/java/design.xml/AccessorClassGeneration" />
+    <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic" />
+    <rule ref="rulesets/java/design.xml/CloseResource" />
+    <rule ref="rulesets/java/design.xml/DefaultLabelNotLastInSwitchStmt" />
+    <rule ref="rulesets/java/design.xml/NonCaseLabelInSwitchStatement" />
+    <rule ref="rulesets/java/design.xml/OptimizableToArrayCall" />
+    <rule ref="rulesets/java/design.xml/BadComparison" />
+    <rule ref="rulesets/java/design.xml/IdempotentOperations" />
+    <rule ref="rulesets/java/design.xml/SimpleDateFormatNeedsLocale" />
+    <rule ref="rulesets/java/design.xml/ImmutableField" />
+    <rule ref="rulesets/java/design.xml/UseLocaleWithCaseConversions" />
+    <rule ref="rulesets/java/design.xml/AvoidProtectedFieldInFinalClass" />
+    <rule ref="rulesets/java/design.xml/SimplifyConditional" />
+    <rule ref="rulesets/java/design.xml/AvoidConstantsInterface" />
+    <rule ref="rulesets/java/design.xml/UnsynchronizedStaticDateFormatter" />
+    <rule ref="rulesets/java/design.xml/PreserveStackTrace" />
+    <rule ref="rulesets/java/design.xml/UseCollectionIsEmpty" />
+    <rule ref="rulesets/java/design.xml/SingularField" />
+    <rule ref="rulesets/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
+    <rule ref="rulesets/java/design.xml/ReturnEmptyArrayRatherThanNull" />
 
 
-    <rule ref="rulesets/optimizations.xml/UseArraysAsList" />
-    <rule ref="rulesets/optimizations.xml/AvoidArrayLoops" />
-    <rule ref="rulesets/optimizations.xml/UnnecessaryWrapperObjectCreation" />
-    <rule ref="rulesets/optimizations.xml/AddEmptyString" />
+    <rule ref="rulesets/java/optimizations.xml/UseArraysAsList" />
+    <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops" />
+    <rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation" />
+    <rule ref="rulesets/java/optimizations.xml/AddEmptyString" />
 
 
-    <rule ref="rulesets/controversial.xml/SuspiciousOctalEscape" />
-    <rule ref="rulesets/controversial.xml/UnusedModifier" />
-    <rule ref="rulesets/controversial.xml/UnnecessaryConstructor" />
+    <rule ref="rulesets/java/controversial.xml/SuspiciousOctalEscape" />
+    <rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor" />
 
 
-    <rule ref="rulesets/codesize.xml/CyclomaticComplexity">
+    <rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
         <properties>
             <property name="reportLevel" value="20" />
         </properties>

File src/test/java/org/kink_lang/kink/internal/box/StringEnhancerTest.java

View file
     private static final GetSite OP_DIV = new GetSite( "op_div" );
 
 
+    // Suppressing wrong warning from PMD
+    @SuppressWarnings( "PMD.AvoidUsingHardCodedIP" )
     @Test
     public void divide_by_found_strings() {
         Value str = Value.value( "AB:::CD::::EF" );