Changeset 1564 for trunk/build

Show
Ignore:
Timestamp:
04/28/08 10:44:02 (4 months ago)
Author:
richi
Message:

check-style: added support for running check-style without user interaction (via -Dcheck-style.namespace= -Dcheck-style.path=main)

Files:

Legend:

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

    r1550 r1564  
    399399  </target> 
    400400   
    401   <target name="check-style" description="check coding standards with PHP_CodeSniffer"
     401  <target name="check-style" description="check coding standards with PHP_CodeSniffer" if="check-style.path,check-style.namespace"
    402402    <echo>----------------------------------</echo> 
    403403    <echo>| Checking CS of source files    |</echo> 
    404404    <echo>----------------------------------</echo> 
    405     <property name="check.path" value="main"/> 
    406     <echo message="currently 'check.path' is set to '${check.path}'"/> 
    407     <input propertyname="namespace" promptChar=":">which stubbles namespace should be checked</input> 
    408405    <if> 
    409406      <or> 
     
    413410      <then> 
    414411        <!-- normal slashes --> 
    415         <exec command="phpcs --standard=${stubbles.base.dir}/src/main/php/org/stubbles/codeSniffer/Stubbles ${stubbles.base.dir}/src/${check.path}/php/net/stubbles/${namespace}" passthru="true"/> 
     412        <exec command="phpcs --standard=${stubbles.base.dir}/src/main/php/org/stubbles/codeSniffer/Stubbles ${stubbles.base.dir}/src/${check-style.path}/php/net/stubbles/${check-style.namespace}" passthru="true"/> 
    416413      </then> 
    417414      <elseif> 
     
    419416        <then> 
    420417          <!-- must be backslashes in first case or PHP_CodeSniffer doesn't find own sniffs --> 
    421           <exec command="phpcs --standard=${stubbles.base.dir}\src\main\php\org\stubbles\codeSniffer\Stubbles ${stubbles.base.dir}/src/${check.path}/php/net/stubbles/${namespace}" passthru="true"/> 
     418          <exec command="phpcs --standard=${stubbles.base.dir}\src\main\php\org\stubbles\codeSniffer\Stubbles ${stubbles.base.dir}/src/${check-style.path}/php/net/stubbles/${check-style.namespace}" passthru="true"/> 
    422419        </then> 
    423420      </elseif>