Skip to content

Commit a782118

Browse files
author
Ang Ming Yi
committed
Return audit results on empty Regexp
In addition to nil objects
1 parent e4f0318 commit a782118

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 nil if filename.blank? || diff.blank?
165+
return nil if filename.blank? || filename == // || 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)