Merge pull request #14871 from issyl0/rubocop-inline-disables
rubocop: Alphabetise, remove config that's default, in-line some disables
This commit is contained in:
commit
61cb843cbb
@ -377,11 +377,6 @@ Style/FetchEnvVar:
|
|||||||
- "/**/Formula/**/*.rb"
|
- "/**/Formula/**/*.rb"
|
||||||
- "**/Formula/**/*.rb"
|
- "**/Formula/**/*.rb"
|
||||||
|
|
||||||
# Prefer tokens with type annotations for consistency
|
|
||||||
# between formatting numbers and strings.
|
|
||||||
Style/FormatStringToken:
|
|
||||||
EnforcedStyle: annotated
|
|
||||||
|
|
||||||
# Not used for casks and formulae.
|
# Not used for casks and formulae.
|
||||||
Style/FrozenStringLiteralComment:
|
Style/FrozenStringLiteralComment:
|
||||||
EnforcedStyle: always
|
EnforcedStyle: always
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
inherit_from:
|
inherit_from:
|
||||||
- ../.rubocop.yml
|
- ../.rubocop.yml
|
||||||
|
|
||||||
|
Bundler/GemFilename:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Homebrew/MoveToExtendOS:
|
Homebrew/MoveToExtendOS:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -64,10 +67,3 @@ Style/Documentation:
|
|||||||
Style/DocumentationMethod:
|
Style/DocumentationMethod:
|
||||||
Include:
|
Include:
|
||||||
- "formula.rb"
|
- "formula.rb"
|
||||||
|
|
||||||
Style/HashAsLastArrayItem:
|
|
||||||
Exclude:
|
|
||||||
- "test/utils/spdx_spec.rb"
|
|
||||||
|
|
||||||
Bundler/GemFilename:
|
|
||||||
Enabled: false
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ describe SPDX do
|
|||||||
license_expression = { any_of: [
|
license_expression = { any_of: [
|
||||||
"MIT",
|
"MIT",
|
||||||
:public_domain,
|
:public_domain,
|
||||||
all_of: ["0BSD", "Zlib"],
|
all_of: ["0BSD", "Zlib"], # rubocop:disable Style/HashAsLastArrayItem
|
||||||
"curl" => { with: "LLVM-exception" },
|
"curl" => { with: "LLVM-exception" },
|
||||||
] }
|
] }
|
||||||
result = [["MIT", :public_domain, "curl", "0BSD", "Zlib"], ["LLVM-exception"]]
|
result = [["MIT", :public_domain, "curl", "0BSD", "Zlib"], ["LLVM-exception"]]
|
||||||
@ -201,7 +201,7 @@ describe SPDX do
|
|||||||
license_expression = { any_of: [
|
license_expression = { any_of: [
|
||||||
"MIT",
|
"MIT",
|
||||||
:public_domain,
|
:public_domain,
|
||||||
all_of: ["0BSD", "Zlib"],
|
all_of: ["0BSD", "Zlib"], # rubocop:disable Style/HashAsLastArrayItem
|
||||||
"curl" => { with: "LLVM-exception" },
|
"curl" => { with: "LLVM-exception" },
|
||||||
] }
|
] }
|
||||||
result = "MIT or Public Domain or (0BSD and Zlib) or (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
|
end
|
||||||
|
|
||||||
|
# rubocop:disable Style/HashAsLastArrayItem
|
||||||
it "handles nested brackets" do
|
it "handles nested brackets" do
|
||||||
expect(described_class.string_to_license_expression("A and (B or (C and D))")).to eq({
|
expect(described_class.string_to_license_expression("A and (B or (C and D))")).to eq({
|
||||||
all_of: [
|
all_of: [
|
||||||
@ -240,6 +241,7 @@ describe SPDX do
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Style/HashAsLastArrayItem
|
||||||
end
|
end
|
||||||
|
|
||||||
describe ".license_version_info" do
|
describe ".license_version_info" do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user