Merge pull request #10594 from Bo98/consistent-alignment

rubocop: use consistent array/hash indentation
This commit is contained in:
Mike McQuaid 2021-02-12 17:29:15 +00:00 committed by GitHub
commit 320bccb38d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 101 additions and 98 deletions

View File

@ -240,6 +240,12 @@ Layout/SpaceAroundOperators:
Layout/RescueEnsureAlignment:
Enabled: false
# significantly less indentation involved; more consistent
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
# favour parens-less DSL-style arguments
Lint/AmbiguousBlockAssociation:
Enabled: false

View File

@ -84,8 +84,7 @@ describe Homebrew::Diagnostic::Checks do
describe "#check_broken_sdks" do
it "doesn't trigger when SDK versions are as expected" do
allow(OS::Mac).to receive(:sdk_locator).and_return(OS::Mac::CLT.sdk_locator)
allow_any_instance_of(OS::Mac::CLTSDKLocator).to receive(:all_sdks)
.and_return([
allow_any_instance_of(OS::Mac::CLTSDKLocator).to receive(:all_sdks).and_return([
OS::Mac::SDK.new(OS::Mac::Version.new("11"), "/some/path/MacOSX.sdk", :clt),
OS::Mac::SDK.new(OS::Mac::Version.new("10.15"), "/some/path/MacOSX10.15.sdk", :clt),
])
@ -94,8 +93,7 @@ describe Homebrew::Diagnostic::Checks do
end
it "triggers when the CLT SDK version doesn't match the folder name" do
allow_any_instance_of(OS::Mac::CLTSDKLocator).to receive(:all_sdks)
.and_return([
allow_any_instance_of(OS::Mac::CLTSDKLocator).to receive(:all_sdks).and_return([
OS::Mac::SDK.new(OS::Mac::Version.new("10.14"), "/some/path/MacOSX10.15.sdk", :clt),
])
@ -105,8 +103,7 @@ describe Homebrew::Diagnostic::Checks do
it "triggers when the Xcode SDK version doesn't match the folder name" do
allow(OS::Mac).to receive(:sdk_locator).and_return(OS::Mac::Xcode.sdk_locator)
allow_any_instance_of(OS::Mac::XcodeSDKLocator).to receive(:all_sdks)
.and_return([
allow_any_instance_of(OS::Mac::XcodeSDKLocator).to receive(:all_sdks).and_return([
OS::Mac::SDK.new(OS::Mac::Version.new("10.14"), "/some/path/MacOSX10.15.sdk", :xcode),
])