Fix Style/MethodName.

This commit is contained in:
Markus Reiter 2016-09-21 09:07:04 +02:00
parent 1c632f9c1e
commit 4064084c58
6 changed files with 9 additions and 21 deletions

View File

@ -242,18 +242,6 @@ Style/IfUnlessModifier:
Style/IndentArray: Style/IndentArray:
EnforcedStyle: special_inside_parentheses EnforcedStyle: special_inside_parentheses
# Offense count: 5
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: snake_case, camelCase
Style/MethodName:
Exclude:
- 'Homebrew/compat/**/*'
- 'Homebrew/cleanup.rb'
- 'Homebrew/diagnostic.rb'
- 'Homebrew/formula_cellar_checks.rb'
- 'Homebrew/formula_installer.rb'
- 'Homebrew/os/mac/cctools_mach.rb'
# Offense count: 7 # Offense count: 7
# Configuration parameters: EnforcedStyle, SupportedStyles. # Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: module_function, extend_self # SupportedStyles: module_function, extend_self

View File

@ -12,7 +12,7 @@ module Homebrew
cleanup_logs cleanup_logs
unless ARGV.dry_run? unless ARGV.dry_run?
cleanup_lockfiles cleanup_lockfiles
rm_DS_Store rm_ds_store
end end
end end
@ -119,7 +119,7 @@ module Homebrew
end end
end end
def self.rm_DS_Store def self.rm_ds_store
paths = Queue.new paths = Queue.new
%w[Cellar Frameworks Library bin etc include lib opt sbin share var] %w[Cellar Frameworks Library bin etc include lib opt sbin share var]
.map { |p| HOMEBREW_PREFIX/p }.each { |p| paths << p if p.exist? } .map { |p| HOMEBREW_PREFIX/p }.each { |p| paths << p if p.exist? }

View File

@ -595,7 +595,7 @@ module Homebrew
EOS EOS
end end
def check_DYLD_vars def check_dyld_vars
dyld_vars = ENV.keys.grep(/^DYLD_/) dyld_vars = ENV.keys.grep(/^DYLD_/)
return if dyld_vars.empty? return if dyld_vars.empty?

View File

@ -1,7 +1,7 @@
require "utils/shell" require "utils/shell"
module FormulaCellarChecks module FormulaCellarChecks
def check_PATH(bin) def check_env_path(bin)
# warn the user if stuff was installed outside of their PATH # warn the user if stuff was installed outside of their PATH
return unless bin.directory? return unless bin.directory?
return if bin.children.empty? return if bin.children.empty?

View File

@ -546,7 +546,7 @@ class FormulaInstaller
@build_time ||= Time.now - @start_time if @start_time && !interactive? @build_time ||= Time.now - @start_time if @start_time && !interactive?
end end
def sanitized_ARGV_options def sanitized_argv_options
args = [] args = []
args << "--ignore-dependencies" if ignore_deps? args << "--ignore-dependencies" if ignore_deps?
@ -585,7 +585,7 @@ class FormulaInstaller
end end
def build_argv def build_argv
sanitized_ARGV_options + options.as_flags sanitized_argv_options + options.as_flags
end end
def build def build
@ -813,8 +813,8 @@ class FormulaInstaller
end end
def audit_installed def audit_installed
audit_check_output(check_PATH(formula.bin)) audit_check_output(check_env_path(formula.bin))
audit_check_output(check_PATH(formula.sbin)) audit_check_output(check_env_path(formula.sbin))
super super
end end

View File

@ -154,7 +154,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
def test_check_dyld_vars def test_check_dyld_vars
ENV["DYLD_INSERT_LIBRARIES"] = "foo" ENV["DYLD_INSERT_LIBRARIES"] = "foo"
assert_match "Setting DYLD_INSERT_LIBRARIES", assert_match "Setting DYLD_INSERT_LIBRARIES",
@checks.check_DYLD_vars @checks.check_dyld_vars
end end
def test_check_for_symlinked_cellar def test_check_for_symlinked_cellar