当我为Drupal项目做Drush cc时,它给了我一个}
。所以在我的代码中的某个地方是一个括号}
。
我有超过1000个php文件。有没有办法轻易找到它?
drush cc all
}
all cache was cleared in /opt/drupal web [success]
我在Ubuntu上工作并使用phpstorm
答案 0 :(得分:0)
如果问题出在您的某个PHP文件中,您可能会使用自动代码检查工具。 PHP CLI提供php -l
选项。否则,您可以使用PHPLint:http://www.icosaedro.it/phplint/
编辑:例如,您可以在Ubuntu终端上对所有*.module
文件使用如下命令:
find . -name "*.module" -exec php -l {} \;
(如有必要,您可以为find
命令添加更多扩展程序,有关详细信息,请参阅https://superuser.com/questions/416425/using-find-for-multiple-file-extensions。
希望它有所帮助,