diff --git a/build.xml b/build.xml
index 4c98ebedafb479645aca257e3d6a8bffff821381..17fd59d44ea5a58066a7aaaaa17c1f91bb1f4a76 100644
--- a/build.xml
+++ b/build.xml
@@ -40,16 +40,17 @@
     <mkdir dir="${builddir}/reports"/>
     <mkdir dir="${builddir}/reports/coverage"/>
 
-    <!-- PHP CodeSniffer -->
-    <exec command="phpcs --standard=PEAR --extensions=php --report=checkstyle ${srcdir}/module/VuFind/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
-
-    <!-- Run PHPUnit -->
+    <!-- Call standard tasks -->
+    <phingcall target="phpcs"/>
     <phingcall target="phpunit"/>
-
-    <!-- PHP API Documentation -->
     <phingcall target="phpdoc"/>
   </target>
 
+  <!-- PHP CodeSniffer -->
+  <target name="phpcs">
+    <exec command="phpcs --standard=PEAR --ignore=*/config/*,*/tests/* --extensions=php --report=checkstyle ${srcdir}/module &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
+  </target>
+
   <!-- PHP API Documentation -->
   <target name="phpdoc">
     <mkdir dir="${builddir}/apidocs"/>