rubocop: use consistent array/hash indentation

This commit is contained in:
Bo Anderson 2021-02-11 13:24:19 +00:00
parent 0d36d54ede
commit 323ff660fa
13 changed files with 101 additions and 98 deletions

View File

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

View File

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