build.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="ownCloud" default="build">
  3. <!-- the target 'build' can be used by developers for command line builds -->
  4. <target name="build" depends="lint"/>
  5. <!-- php syntax analysis -->
  6. <target name="lint">
  7. <apply executable="php" failonerror="true">
  8. <arg value="-l" />
  9. <fileset dir="${basedir}">
  10. <include name="**/*.php" />
  11. <exclude name="**/3rdparty/**" />
  12. <exclude name="**/l10n/**" />
  13. <!-- modified / -->
  14. </fileset>
  15. </apply>
  16. <!-- this looks for @brief and @returns annotation in PHP files and fails if it found some -->
  17. <apply executable="egrep" failonerror="false" resultproperty="grepReturnCode">
  18. <arg value="-rsHn" />
  19. <arg value="@brief|@returns" />
  20. <fileset dir="${basedir}/build">
  21. <include name="**/*.php" />
  22. <exclude name="**/3rdparty/**" />
  23. <exclude name="**/l10n/**" />
  24. </fileset>
  25. </apply>
  26. <!-- fail if grep has found something -->
  27. <fail message="Please remove @returns and @brief annotations for PHPDoc (listed above)">
  28. <condition>
  29. <equals arg1="0" arg2="${grepReturnCode}"/>
  30. </condition>
  31. </fail>
  32. </target>
  33. </project>