Changeset 12582 in josm


Ignore:
Timestamp:
2017-08-08T23:37:33+02:00 (2 months ago)
Author:
bastiK
Message:

see #14794 - add checkstyle check

Location:
trunk
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r12534 r12582  
    2424        <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
    2525        <property name="proj-build.dir" location="${base.dir}/build2"/>
     26        <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
    2627        <property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
    2728        <property name="groovy.jar" location="${base.dir}/tools/groovy-all.jar"/>
     
    302303        </javac>
    303304        <!-- JOSM -->
    304         <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}" 
     305        <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}"
    305306            excludes="com/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**"
    306307            destdir="build" target="1.8" source="1.8" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
     
    366367        <delete dir="${build.dir}"/>
    367368        <delete dir="${proj-build.dir}"/>
     369        <delete dir="${checkstyle-build.dir}"/>
    368370        <delete dir="${dist.dir}"/>
    369371        <delete dir="${mapcss.dir}/parsergen"/>
     
    760762    </target>
    761763
    762     <target name="checkstyle" depends="init-properties">
     764    <target name="checkstyle-compile" depends="init-properties">
     765        <mkdir dir="${checkstyle-build.dir}"/>
     766        <javac sourcepath="" srcdir="${base.dir}/tools/checkstyle/checks" failonerror="true"
     767            destdir="${checkstyle-build.dir}" target="1.8" source="1.8" debug="on"
     768            includeantruntime="false" createMissingPackageInfoClass="false"
     769            encoding="UTF-8" classpath="tools/checkstyle/checkstyle-all.jar">
     770        </javac>
     771    </target>
     772    <target name="checkstyle" depends="checkstyle-compile">
    763773        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
    764              classpath="tools/checkstyle/checkstyle-all.jar"/>
     774             classpath="tools/checkstyle/checkstyle-all.jar:dist/josm-custom.jar:${checkstyle-build.dir}"/>
    765775        <checkstyle config="tools/checkstyle/josm_checks.xml">
    766776            <fileset dir="${base.dir}/src/org/openstreetmap/josm" includes="**/*.java"
  • trunk/tools/checkstyle/josm_checks.xml

    r12081 r12582  
    103103    <module name="FinalClass"/>
    104104    <module name="HideUtilityClassConstructor"/>
     105    <module name="org.openstreetmap.josm.TopLevelJavadocCheck"/>
    105106  </module>
    106107  <module name="Header">
  • trunk/tools/checkstyle/josm_filters.xml

    r12254 r12582  
    4444  <suppress checks="HeaderCheck" files="DNSName(Fix)?\.java" />
    4545  <suppress checks="FileLengthCheck" files="DomainValidator\.java" />
     46  <suppress checks="org.openstreetmap.josm.TopLevelJavadocCheck" files="package-info\.java" />
    4647</suppressions>
Note: See TracChangeset for help on using the changeset viewer.