rubocop: In-line disables of Lint/ConstantDefinitionInBlock
This commit is contained in:
parent
6797f30bbf
commit
4a8384e8a8
@ -323,11 +323,6 @@ Lint/DuplicateBranch:
|
|||||||
- "/**/{Formula,Casks}/*.rb"
|
- "/**/{Formula,Casks}/*.rb"
|
||||||
- "**/{Formula,Casks}/*.rb"
|
- "**/{Formula,Casks}/*.rb"
|
||||||
|
|
||||||
# useful for metaprogramming in RSpec
|
|
||||||
Lint/ConstantDefinitionInBlock:
|
|
||||||
Exclude:
|
|
||||||
- "**/*_spec.rb"
|
|
||||||
|
|
||||||
# so many of these in formulae and can't be autocorrected
|
# so many of these in formulae and can't be autocorrected
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
Lint/ParenthesesAsGroupedExpression:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -90,11 +90,11 @@ describe "Exception" do
|
|||||||
let(:mod) do
|
let(:mod) do
|
||||||
Module.new do
|
Module.new do
|
||||||
# These are defined within an anonymous module to avoid polluting the global namespace.
|
# These are defined within an anonymous module to avoid polluting the global namespace.
|
||||||
# rubocop:disable RSpec/LeakyConstantDeclaration
|
# rubocop:disable RSpec/LeakyConstantDeclaration,Lint/ConstantDefinitionInBlock
|
||||||
class Bar < Requirement; end
|
class Bar < Requirement; end
|
||||||
|
|
||||||
class Baz < Formula; end
|
class Baz < Formula; end
|
||||||
# rubocop:enable RSpec/LeakyConstantDeclaration
|
# rubocop:enable RSpec/LeakyConstantDeclaration,Lint/ConstantDefinitionInBlock
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ describe "patching" do
|
|||||||
let(:formula_subclass) {
|
let(:formula_subclass) {
|
||||||
Class.new(Formula) {
|
Class.new(Formula) {
|
||||||
# These are defined within an anonymous class to avoid polluting the global namespace.
|
# These are defined within an anonymous class to avoid polluting the global namespace.
|
||||||
# rubocop:disable RSpec/LeakyConstantDeclaration
|
# rubocop:disable RSpec/LeakyConstantDeclaration,Lint/ConstantDefinitionInBlock
|
||||||
TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
|
TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
|
||||||
TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz"
|
TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz"
|
||||||
PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff"
|
PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff"
|
||||||
@ -17,7 +17,7 @@ describe "patching" do
|
|||||||
APPLY_A = "noop-a.diff"
|
APPLY_A = "noop-a.diff"
|
||||||
APPLY_B = "noop-b.diff"
|
APPLY_B = "noop-b.diff"
|
||||||
APPLY_C = "noop-c.diff"
|
APPLY_C = "noop-c.diff"
|
||||||
# rubocop:enable RSpec/LeakyConstantDeclaration
|
# rubocop:enable RSpec/LeakyConstantDeclaration,Lint/ConstantDefinitionInBlock
|
||||||
|
|
||||||
url TESTBALL_URL
|
url TESTBALL_URL
|
||||||
sha256 TESTBALL_SHA256
|
sha256 TESTBALL_SHA256
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user