Changeset 13303 in josm


Ignore:
Timestamp:
2018-01-11T01:19:33+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15574 - new target checkstyle-changed to call checkstyle only for modified files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r13280 r13303  
    814814        </javac>
    815815    </target>
     816    <target name="checkstyle-changed" depends="checkstyle-compile">
     817        <exec append="false" osfamily="unix" executable="bash" failifexecutionfails="true">
     818            <arg value="-c"/>
     819            <arg value="svn status -q --ignore-externals src test | grep -o '\(src\|test\)/.*' | xargs java -cp '${checkstyle.dir}/checkstyle-all.jar:${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml | sed -e 's:\([^ ]*\) [^:]*/\([^:/]*.java\:[^:]*\):(\2)\1:'"/>
     820        </exec>
     821        <exec append="false" osfamily="windows" executable="powershell" failifexecutionfails="true">
     822            <arg value="/c"/>
     823            <arg value="svn status -q --ignore-externals src test | ForEach-Object {java -cp '${checkstyle.dir}/checkstyle-all.jar;${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml $_.split(' ')[7]}"/>
     824        </exec>
     825    </target>
    816826    <target name="checkstyle" depends="checkstyle-compile">
    817827        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
Note: See TracChangeset for help on using the changeset viewer.