aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorJCount2017-08-23 16:16:07 -0400
committerGitHub2017-08-23 16:16:07 -0400
commit6023e408dadc483e2c29dd537f535b8f630f905a (patch)
treecf57343883d91dbb4a592ca392e643a5d26b6851 /Library/Homebrew/dev-cmd
parentce5e1e20845a9a0e9035684e92ca874571f14634 (diff)
parent781da49df87f9f2ddbb3f812e3d53963500cc423 (diff)
downloadbrew-6023e408dadc483e2c29dd537f535b8f630f905a.tar.bz2
Merge pull request #2995 from GauthamGoli/audit_line_rubocop_part_2
audit: Port line_problems to rubocop and add tests part 2
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb36
1 files changed, 0 insertions, 36 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 170fb6d5f..5e1220e23 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -808,39 +808,6 @@ class FormulaAuditor
end
def line_problems(line, _lineno)
- if line =~ /<(Formula|AmazonWebServicesFormula|ScriptFileFormula|GithubGistFormula)/
- problem "Use a space in class inheritance: class Foo < #{Regexp.last_match(1)}"
- end
-
- # Commented-out cmake support from default template
- problem "Commented cmake call found" if line.include?('# system "cmake')
-
- # Comments from default template
- [
- "# PLEASE REMOVE",
- "# Documentation:",
- "# if this fails, try separate make/make install steps",
- "# The URL of the archive",
- "## Naming --",
- "# if your formula requires any X11/XQuartz components",
- "# if your formula fails when building in parallel",
- "# Remove unrecognized options if warned by configure",
- ].each do |comment|
- next unless line.include?(comment)
- problem "Please remove default template comments"
- end
-
- # 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)}"
@@ -890,9 +857,6 @@ class FormulaAuditor
end
end
- # Commented-out depends_on
- problem "Commented-out dep #{Regexp.last_match(1)}" if line =~ /#\s*depends_on\s+(.+)\s*$/
-
if line =~ /if\s+ARGV\.include\?\s+'--(HEAD|devel)'/
problem "Use \"if build.#{Regexp.last_match(1).downcase}?\" instead"
end