rubocops/cask/url: put keyword parameters on a new line
This commit is contained in:
parent
485f1abbee
commit
c75122c694
@ -41,6 +41,15 @@ module RuboCop
|
|||||||
|
|
||||||
return unless hash_node.hash_type?
|
return unless hash_node.hash_type?
|
||||||
|
|
||||||
|
unless stanza_node.source.match?(/",\n *\w+:/)
|
||||||
|
add_offense(
|
||||||
|
stanza_node.source_range,
|
||||||
|
message: "Keyword URL parameter should be on a new indented line.",
|
||||||
|
) do |corrector|
|
||||||
|
corrector.replace(stanza_node.source_range, stanza_node.source.gsub(/",\s*/, "\",\n "))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
hash_node.each_pair do |key_node, value_node|
|
hash_node.each_pair do |key_node, value_node|
|
||||||
next if key_node.source != "verified"
|
next if key_node.source != "verified"
|
||||||
next unless value_node.str_type?
|
next unless value_node.str_type?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user