Skip to content

Commit

Permalink
Disable Layout/DotPosition cop on heredocs
Browse files Browse the repository at this point in the history
Rubocop v1.22.0 changed how DotPosition handled heredocs, but also
causes false positives when the method is on the same line as the start of the heredoc.
We can remove these disable comments once [this PR](rubocop/rubocop#10141) is merged.
  • Loading branch information
tjvman committed Sep 29, 2021
1 parent 9d1cc1f commit f36eb93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Expand Up @@ -23,11 +23,13 @@ def flush
ids << c[0]
end

# rubocop:disable Layout/DotPosition
@db[<<-SQL, *@batched_commands.flatten, *ids].update
UPDATE droplets
SET process_types = (CASE #{cases.join(' ')} ELSE process_types END)
WHERE id IN (#{id_place_holders.join(',')})
SQL
# rubocop:enable Layout/DotPosition
end

@batched_commands = []
Expand Down
2 changes: 2 additions & 0 deletions lib/services/service_brokers/service_manager.rb
Expand Up @@ -173,12 +173,14 @@ def delete_services(catalog)
end

class DeactivatedPlansWarning
# rubocop:disable Layout/DotPosition
WARNING = <<~END_OF_STRING.squish.freeze
Warning: Service plans are missing from the broker's catalog (%<broker_url>s/v2/catalog) but can not be removed from
Cloud Foundry while instances exist. The plans have been deactivated to prevent users from attempting to provision new
instances of these plans. The broker should continue to support bind, unbind, and delete for existing instances; if
these operations fail contact your broker provider.
END_OF_STRING
# rubocop:enable Layout/DotPosition

def initialize
@nested_warnings = {}
Expand Down
2 changes: 2 additions & 0 deletions spec/api/documentation/app_bits_api_spec.rb
Expand Up @@ -84,6 +84,7 @@
are also the default bits for a DEA backend. File mode bits are required to have at least the minimum permissions of 0600.
EOS

# rubocop:disable Layout/DotPosition
request_body_example = <<-EOS.gsub(/^ */, '')
--AaB03x
Content-Disposition: form-data; name="async"
Expand All @@ -102,6 +103,7 @@
&lt;&lt;binary artifact bytes&gt;&gt;
--AaB03x
EOS
# rubocop:enable Layout/DotPosition

client.put "/v2/apps/#{process.guid}/bits", app_bits_put_params, headers
example.metadata[:requests].each do |req|
Expand Down

0 comments on commit f36eb93

Please sign in to comment.