diff options
| author | Gautham Goli | 2017-07-31 14:30:37 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-08-06 18:36:09 +0530 |
| commit | b5da76e28d0a01d8e07076f8bba6cd2733597d6c (patch) | |
| tree | 101c24a3ed583da37a13f793e6bd9ca38cfd2b46 /Library/Homebrew/dev-cmd | |
| parent | bc2bcef1ba084e271ecdfd523a96e6db477e6475 (diff) | |
| download | brew-b5da76e28d0a01d8e07076f8bba6cd2733597d6c.tar.bz2 | |
audit: Port FileUtils, inreplace audit rules in audit_lines to rubocop
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 323b37170..cd5528cf5 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -809,17 +809,6 @@ class FormulaAuditor end def line_problems(line, _lineno) - # FileUtils is included in Formula - # encfs modifies a file with this name, so check for some leading characters - if line =~ %r{[^'"/]FileUtils\.(\w+)} - problem "Don't need 'FileUtils.' before #{Regexp.last_match(1)}." - end - - # Check for long inreplace block vars - if line =~ /inreplace .* do \|(.{2,})\|/ - problem "\"inreplace <filenames> do |s|\" is preferred over \"|#{Regexp.last_match(1)}|\"." - end - # Check for string interpolation of single values. if line =~ /(system|inreplace|gsub!|change_make_var!).*[ ,]"#\{([\w.]+)\}"/ problem "Don't need to interpolate \"#{Regexp.last_match(2)}\" with #{Regexp.last_match(1)}" |
