Merge pull request #1125 from reitermarkus/rubocop-macos

RuboCop: MacOS
This commit is contained in:
Mike McQuaid 2016-09-27 09:33:56 +01:00 committed by GitHub
commit 92e6edea53
7 changed files with 123 additions and 127 deletions

View File

@ -96,11 +96,6 @@ Style/ClassVars:
- 'Homebrew/test/testing_env.rb'
- 'Homebrew/utils.rb'
# Offense count: 1
Style/ConstantName:
Exclude:
- 'Homebrew/os/mac.rb'
# Offense count: 13
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
@ -129,7 +124,6 @@ Style/IndentArray:
Style/ModuleFunction:
Exclude:
- 'Homebrew/global.rb'
- 'Homebrew/os/mac.rb'
- 'Homebrew/os/mac/xcode.rb'
- 'Homebrew/os/mac/xquartz.rb'

View File

@ -4,6 +4,8 @@ require "os/mac/version"
module OS
module Mac
module_function
SYSTEM_DIRS = [
"/",
"/Applications",

View File

@ -2,7 +2,8 @@ require "development_tools"
module OS
module Mac
class << self
module_function
def xcode_folder
odeprecated "MacOS.xcode_folder", "MacOS::Xcode.folder"
Xcode.folder
@ -143,4 +144,3 @@ module OS
end
end
end
end

View File

@ -1,7 +1,8 @@
module OS
module Mac
module Xcode
class << self
module_function
def provides_autotools?
odeprecated "OS::Mac::Xcode.provides_autotools?"
version < "4.3"
@ -9,4 +10,3 @@ module OS
end
end
end
end

View File

@ -9,9 +9,9 @@ require "os/mac/keg"
module OS
module Mac
extend self
module_function
::MacOS = self # compatibility
::MacOS = self # rubocop:disable Style/ConstantName
raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]

View File

@ -1,7 +1,7 @@
module OS
module Mac
module Xcode
extend self
module_function
V4_BUNDLE_ID = "com.apple.dt.Xcode".freeze
V3_BUNDLE_ID = "com.apple.Xcode".freeze

View File

@ -3,7 +3,7 @@ module OS
X11 = XQuartz = Module.new
module XQuartz
extend self
module_function
FORGE_BUNDLE_ID = "org.macosforge.xquartz.X11".freeze
APPLE_BUNDLE_ID = "org.x.X11".freeze