Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 30311)
+++ Gruntfile.js	(working copy)
@@ -421,6 +421,22 @@
 				dest: SOURCE_DIR
 			}
 		},
+		search: {
+			// The __DIR__ constant isn't available in PHP 5.2, so we can't use it yet.
+			DIR: {
+				files: {
+					src: [
+						'*.php',
+						'**/*.php'
+					]
+				},
+				options: {
+					searchString: '__DIR__',
+					logFormat:    'console',
+					failOnMatch:  true
+				}
+			}
+		},
 		watch: {
 			all: {
 				files: [
@@ -476,7 +492,7 @@
 
 	// Pre-commit task.
 	grunt.registerTask('precommit', 'Runs front-end dev/test tasks in preparation for a commit.',
-		['autoprefixer:core', 'imagemin:core', 'jshint:corejs', 'qunit:compiled']);
+		['autoprefixer:core', 'imagemin:core', 'jshint:corejs', 'qunit:compiled', 'search']);
 
 	// Copy task.
 	grunt.registerTask('copy:all', ['copy:files', 'copy:wp-admin-rtl', 'copy:version']);
Index: package.json
===================================================================
--- package.json	(revision 30311)
+++ package.json	(working copy)
@@ -26,6 +26,7 @@
     "grunt-legacy-util": "^0.2.0",
     "grunt-patch-wordpress": "~0.2.1",
     "grunt-sass": "~0.16.0",
+    "grunt-search": "^0.1.6",
     "matchdep": "~0.3.0"
   }
 }
