diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 74c41a77b6..c1601ee534 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -65,9 +65,5 @@ Style/DocumentationMethod: Include: - "formula.rb" -Style/HashAsLastArrayItem: - Exclude: - - "test/utils/spdx_spec.rb" - Bundler/GemFilename: Enabled: false diff --git a/Library/Homebrew/test/utils/spdx_spec.rb b/Library/Homebrew/test/utils/spdx_spec.rb index 8d84bb03e1..b3a78550e6 100644 --- a/Library/Homebrew/test/utils/spdx_spec.rb +++ b/Library/Homebrew/test/utils/spdx_spec.rb @@ -81,7 +81,7 @@ describe SPDX do license_expression = { any_of: [ "MIT", :public_domain, - all_of: ["0BSD", "Zlib"], + all_of: ["0BSD", "Zlib"], # rubocop:disable Style/HashAsLastArrayItem "curl" => { with: "LLVM-exception" }, ] } result = [["MIT", :public_domain, "curl", "0BSD", "Zlib"], ["LLVM-exception"]] @@ -201,7 +201,7 @@ describe SPDX do license_expression = { any_of: [ "MIT", :public_domain, - all_of: ["0BSD", "Zlib"], + all_of: ["0BSD", "Zlib"], # rubocop:disable Style/HashAsLastArrayItem "curl" => { with: "LLVM-exception" }, ] } result = "MIT or Public Domain or (0BSD and Zlib) or (curl with LLVM-exception)" @@ -229,6 +229,7 @@ describe SPDX do }) end + # rubocop:disable Style/HashAsLastArrayItem it "handles nested brackets" do expect(described_class.string_to_license_expression("A and (B or (C and D))")).to eq({ all_of: [ @@ -240,6 +241,7 @@ describe SPDX do ], }) end + # rubocop:enable Style/HashAsLastArrayItem end describe ".license_version_info" do