Changeset 1261

Show
Ignore:
Timestamp:
01/18/08 14:00:39 (9 months ago)
Author:
richi
Message:

enhancement #48: updated build files due to new features of the PHP_CodeSniffer v1.0.0 release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build.xml

    r1235 r1261  
    6565  </target> 
    6666   
    67   <!-- workaround for PHP_CodeSniffer bug #11886 --> 
    68   <target name="copy-standards" description="copy stubbles standards into PHP_CodeSniffer 'Standards' dir"> 
    69     <phing phingfile="${build.base.dir}/stubbles/build.xml" target="copy-standards" /> 
    70   </target> 
    71    
    72   <target name="check-standards" description="check coding standards"> 
    73     <phing phingfile="${build.base.dir}/stubbles/build.xml" target="check-standards" /> 
    74   </target> 
    75  
    76   <!-- deprecated --> 
    7767  <target name="check-style" description="check coding standards"> 
    78     <if> 
    79       <isset property="package" /> 
    80       <then> 
    81         <phing phingfile="${build.base.dir}/${package}/build.xml" target="check-style" /> 
    82       </then> 
    83       <else> 
    84         <phing phingfile="${build.base.dir}/stubbles/build.xml" target="check-style" /> 
    85       </else> 
    86     </if> 
     68    <phing phingfile="${build.base.dir}/stubbles/build.xml" target="check-style" /> 
    8769  </target> 
    8870 
  • trunk/build/stubbles/build.xml

    r1255 r1261  
    262262  </target> 
    263263   
    264   <!-- workaround for PHP_CodeSniffer bug #11886 --> 
    265   <target name="copy-standards" description="copy stubbles standards into PHP_CodeSniffer 'Standards' dir"> 
    266     <echo>----------------------------------</echo> 
    267     <echo>| Copy Coding Standards          |</echo> 
    268     <echo>----------------------------------</echo> 
    269     <php expression="exec('pear config-get php_dir');" returnProperty="pearDir"/> 
    270     <property name="codeSniffer.standardsDir" value="${pearDir}/PHP/CodeSniffer/Standards/Stubbles"/> 
    271     <delete dir="${codeSniffer.standardsDir}" failonerror="true" /> 
    272     <copy toDir="${codeSniffer.standardsDir}" overwrite="true"> 
    273       <fileset dir="${stubbles.base.dir}/src/main/php/org/stubbles/codeSniffer/stubbles">  
    274         <include name="**/*.php" /> 
    275       </fileset> 
    276     </copy> 
    277   </target> 
    278    
    279   <target name="check-standards" description="check coding standards"> 
     264  <target name="check-style" description="check coding standards with PHP_CodeSniffer"> 
    280265    <echo>----------------------------------</echo> 
    281266    <echo>| Checking CS of source files    |</echo> 
    282267    <echo>----------------------------------</echo> 
    283268    <input propertyname="namespace" promptChar=":">which stubbles namespace should be checked</input> 
    284     <exec command="phpcs --standard=stubbles ${stubbles.base.dir}/src/main/php/net/stubbles/${namespace}" passthru="true"/> 
    285   </target> 
    286    
    287   <!-- deprecated --> 
    288   <target name="check-style" description="check coding standards"> 
    289     <echo>----------------------------------</echo> 
    290     <echo>| Checking CS of source files    |</echo> 
    291     <echo>----------------------------------</echo> 
    292     <checkStyle failonerror="true"> 
    293       <fileset dir="${stubbles.base.dir}/src/main/php"> 
    294         <include name="**/*.php" /> 
    295         <exclude name="**/org/simpletest/**" /> 
    296         <exclude name="**/info/**" /> 
    297         <exclude name="**/de/**" /> 
    298       </fileset> 
    299     </checkStyle> 
    300   </target> 
     269    <!-- must be backslashes in first case or PHP_CodeSniffer doesn't find own sniffs --> 
     270    <exec command="phpcs --standard=${stubbles.base.dir}\src\main\php\org\stubbles\codeSniffer\stubbles ${stubbles.base.dir}/src/main/php/net/stubbles/${namespace}" passthru="true"/> 
     271  </target> 
     272 
    301273</project>