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:
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
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: module_function, extend_self

View File

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

View File

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

View File

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

View File

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

View File

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