Created
April 12, 2018 23:43
-
-
Save Enelar/30156f533acabc7804a364f6a3f9bc90 to your computer and use it in GitHub Desktop.
Find any catch block without _logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgrep -zoP "catch(?:.*){\n(?:.*\n){0,10}?(?:.*?(_logger)?.*\n)(?:.*\n){0,10}?.*}\n" | grep -aEvz "(.*.php).*(_logger).*?\n" | grep -aPo "(.*php)" | |
# catch (\Exception $e) { | |
# $this->_logger->critical($e); | |
# $message = __('An exception occurred while saving the address'); | |
# $response = ['error' => 'true', 'message' => $message]; | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment