0

Hello i want to create phpcs.xml file. but i am not sure about whether this file is created by ant or codesniffer ? the reason for creating phpcs.xml is i want to add code block in build.xml file which i need to use in jenkins. can you please provide me help how to create this file? below is the code that i want to add in build.xml file.

 <target name="phpcs" description="Find coding standard violations using CodeSniffer">
 <exec executable="phpcs" output="/dev/null">
 <arg value="--report=checkstyle" />
 <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
 <arg value="--standard=${basedir}/build/phpcs.xml" />
 <arg path="${basedir}/src" />
 </exec>
 </target>
user2282615
  • 21
  • 1
  • 3
  • I don't really understand what do you want to do. Do you want to add this code to an existing build.xml as a new target using ant? – pepuch Apr 24 '13 at 06:31
  • let me explain my original story i am developing maven php project. i have build.xml which is created through maven by using command : mvn ant:ant - will generate build.xml,maven-build.xml,maven-build.properties. now i want to add this project in jenkins which is contious integration tool. before that i want to add my codesniffer report which i thought will be generated through phpcs.xml file. but i don't know how to create it. so can you help me to figure out how to create phpcs.xml file. – user2282615 Apr 24 '13 at 06:47
  • And you want to add this code to build.xml generated by maven? – pepuch Apr 24 '13 at 06:49
  • yes . actually above given code is ant build code i am not sure whether i can use this in maven build file? – user2282615 Apr 24 '13 at 06:51
  • I think that here is the answer http://stackoverflow.com/questions/1456901/how-to-wrap-an-ant-build-with-maven. – pepuch Apr 24 '13 at 06:53
  • i am not undestanding anything from stackoverflow.com/questions/1456901/… as i am php developer as am unware of jar,war files. can u please help me how to configure my php project in jenkins and show codesniffer , and test results in jenkins – user2282615 Apr 24 '13 at 08:36

0 Answers0