Last active
December 20, 2015 15:38
-
-
Save andrewrjones/6155225 to your computer and use it in GitHub Desktop.
Ant task to run Perl code through perltidy. Windows and Unix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- perltidy executable --> | |
<condition property="perltidy.exe" value="perltidy.bat"> | |
<os family="windows" /> | |
</condition> | |
<condition property="perltidy.exe" value="perltidy"> | |
<os family="unix" /> | |
</condition> | |
<fail unless="perltidy.exe">No perltidy executable defined for this OS</fail> | |
<target name="perl:tidy" description="Tidies the Perl code" depends=""> | |
<echo message="Running perltidy" /> | |
<property name="perl.src.dir" value="${src.dir}/perl" /> | |
<apply executable="${perltidy.exe}"> | |
<arg value="-b"/> | |
<fileset dir="${perl.src.dir}"> | |
<patternset> | |
<include name="**/*.pl"/> | |
<include name="**/*.pm"/> | |
<include name="**/*.t"/> | |
</patternset> | |
</fileset> | |
</apply> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment