| 224 | | |
|---|
| | 224 | |
|---|
| | 225 | <!-- workaround for PHP_CodeSniffer bug #11886 --> |
|---|
| | 226 | <target name="copy-standards" description="copy stubbles standards into PHP_CodeSniffer 'Standards' dir"> |
|---|
| | 227 | <echo>----------------------------------</echo> |
|---|
| | 228 | <echo>| Copy Coding Standards |</echo> |
|---|
| | 229 | <echo>----------------------------------</echo> |
|---|
| | 230 | <php expression="exec('pear config-get php_dir');" returnProperty="pearDir"/> |
|---|
| | 231 | <property name="codeSniffer.standardsDir" value="${pearDir}/PHP/CodeSniffer/Standards/stubbles"/> |
|---|
| | 232 | <delete dir="${codeSniffer.standardsDir}" failonerror="true" /> |
|---|
| | 233 | <copy toDir="${codeSniffer.standardsDir}" overwrite="true"> |
|---|
| | 234 | <fileset dir="${project.basedir}/../../src/main/php/org/stubbles/codeSniffer/stubbles"> |
|---|
| | 235 | <include name="**/*.php" /> |
|---|
| | 236 | </fileset> |
|---|
| | 237 | </copy> |
|---|
| | 238 | </target> |
|---|
| | 239 | |
|---|
| | 240 | <target name="check-standards" description="check coding standards"> |
|---|
| | 241 | <echo>----------------------------------</echo> |
|---|
| | 242 | <echo>| Checking CS of source files |</echo> |
|---|
| | 243 | <echo>----------------------------------</echo> |
|---|
| | 244 | <input propertyname="namespace" promptChar=":">which stubbles namespace should be checked</input> |
|---|
| | 245 | <exec command="phpcs --standard=stubbles ${project.basedir}/../../src/main/php/net/stubbles/${namespace}" passthru="true"/> |
|---|
| | 246 | </target> |
|---|
| | 247 | |
|---|
| | 248 | <!-- deprecated --> |
|---|