function do_coder_review_grep in Coder 7
Same name and namespace in other branches
- 5.2 coder.module \do_coder_review_grep()
- 5 coder.module \do_coder_review_grep()
- 6.2 coder.module \do_coder_review_grep()
- 6 coder.module \do_coder_review_grep()
- 7.2 coder_review/coder_review.common.inc \do_coder_review_grep()
Search for a string.
See also
1 call to do_coder_review_grep()
- do_coder_review in coder_review/
coder_review.module - Perform code review for a review array.
File
- coder_review/
coder_review.module, line 1856
Code
function do_coder_review_grep(&$coder_args, $review, $rule, $lines, &$results) {
if (isset($rule['#value'])) {
foreach ($lines as $lineno => $line_array) {
foreach ($line_array as $line) {
if (_coder_review_search_string($line, $rule)) {
$line = $coder_args['#all_lines'][$lineno];
$severity_name = _coder_review_severity_name($coder_args, $review, $rule);
if (!isset($coder_args['#ignore_lines'][$review['#review_name']])) {
$coder_args['#ignore_lines'][$review['#review_name']] = array();
}
_coder_review_error($results, $rule, $severity_name, $lineno, $line, $coder_args['#ignore_lines'][$review['#review_name']]);
}
}
}
}
}