Skip to content

Commit e4f0318

Browse files
author
Ang Ming Yi
committed
Return nil if blank filename or diff
To allow auditor to skip this entry
1 parent 88be484 commit e4f0318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/rule_auditor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def audit_commit_pattern(commit, pattern, diff)
162162

163163
def audit_specific_file_changes_pattern(pattern, filename, diff)
164164
results = []
165-
return results if filename.blank? || diff.blank?
165+
return nil if filename.blank? || diff.blank?
166166
diff.each do |d|
167167
next if d.file.empty? || (d.file =~ filename).blank?
168168
next if d.body.empty? || (d.body =~ pattern).blank?

0 commit comments

Comments
 (0)