fix style
This commit is contained in:
parent
4e286ee36d
commit
cf84800939
@ -424,7 +424,7 @@ module RuboCop
|
|||||||
def audit_formula(_node, _class_node, _parent_class_node, body_node)
|
def audit_formula(_node, _class_node, _parent_class_node, body_node)
|
||||||
install = find_method_def(body_node, :install)
|
install = find_method_def(body_node, :install)
|
||||||
|
|
||||||
correctable_shell_completion_node(install) do |node, shell, base_name, executable, subcmd, shell_parameter|
|
correctable_shell_completion_node(install) do |node, shell, base_name, executable, subcmd, shell_parameter| # rubocop:disable Metrics/ParameterLists
|
||||||
# generate_completions_from_executable only applicable if shell is passed
|
# generate_completions_from_executable only applicable if shell is passed
|
||||||
next unless shell_parameter.match?(/(bash|zsh|fish)/)
|
next unless shell_parameter.match?(/(bash|zsh|fish)/)
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
require "rubocops/lines"
|
require "rubocops/lines"
|
||||||
|
|
||||||
describe RuboCop::Cop::FormulaAudit::Lines do
|
describe RuboCop::Cop::FormulaAudit do
|
||||||
|
describe RuboCop::Cop::FormulaAudit::Lines do
|
||||||
subject(:cop) { described_class.new }
|
subject(:cop) { described_class.new }
|
||||||
|
|
||||||
context "when auditing deprecated special dependencies" do
|
context "when auditing deprecated special dependencies" do
|
||||||
@ -57,9 +58,9 @@ describe RuboCop::Cop::FormulaAudit::Lines do
|
|||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL do
|
describe RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL do
|
||||||
subject(:cop) { described_class.new }
|
subject(:cop) { described_class.new }
|
||||||
|
|
||||||
it "reports an offense when writing to a shell completions file directly" do
|
it "reports an offense when writing to a shell completions file directly" do
|
||||||
@ -98,9 +99,9 @@ describe RuboCop::Cop::FormulaAudit::GenerateCompletionsDSL do
|
|||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall do
|
describe RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall do
|
||||||
subject(:cop) { described_class.new }
|
subject(:cop) { described_class.new }
|
||||||
|
|
||||||
it "reports an offense when using multiple #generate_completions_from_executable calls for different shells" do
|
it "reports an offense when using multiple #generate_completions_from_executable calls for different shells" do
|
||||||
@ -129,4 +130,5 @@ describe RuboCop::Cop::FormulaAudit::SingleGenerateCompletionsDSLCall do
|
|||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user