nextcloud/build/build.xml

42 lines
1.1 KiB
XML
Raw Permalink Normal View History

2012-12-16 00:03:32 +04:00
<?xml version="1.0" encoding="UTF-8"?>
2014-12-10 12:07:22 +03:00
<project name="ownCloud" default="build">
2012-12-16 00:03:32 +04:00
<!-- the target 'build' can be used by developers for command line builds -->
2014-12-10 12:07:22 +03:00
<target name="build" depends="lint"/>
2012-12-16 00:03:32 +04:00
<!-- php syntax analysis -->
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<exclude name="**/3rdparty/**" />
<exclude name="**/l10n/**" />
<!-- modified / -->
</fileset>
</apply>
<!-- this looks for @brief and @returns annotation in PHP files and fails if it found some -->
<apply executable="egrep" failonerror="false" resultproperty="grepReturnCode">
<arg value="-rsHn" />
<arg value="@brief|@returns" />
<fileset dir="${basedir}/build">
<include name="**/*.php" />
<exclude name="**/3rdparty/**" />
<exclude name="**/l10n/**" />
</fileset>
</apply>
<!-- fail if grep has found something -->
<fail message="Please remove @returns and @brief annotations for PHPDoc (listed above)">
<condition>
<equals arg1="0" arg2="${grepReturnCode}"/>
</condition>
</fail>
2012-12-16 00:03:32 +04:00
</target>
</project>