Add and apply Layout/DotPosition rule

Since IRB has improved its support for multiline, the main argument
towars using a trailing dot no longer affects most people.

It still affects me, though, since I use Pry :), but I agree
leading dots are more readable, so I'm enabling the rule anyway.
This commit is contained in:
Javi Martín
2023-07-01 14:53:02 +02:00
parent fd71ae5333
commit 09c63e354c
15 changed files with 72 additions and 69 deletions

View File

@@ -220,8 +220,8 @@ describe RemoteTranslations::Caller, :remote_translations do
locale = remote_translation.locale
fake_response = ["translated title", "translated description", "translated summary", nil]
expect_any_instance_of(client).to receive(:call).with(field_values_sanitized, locale).
and_return(fake_response)
expect_any_instance_of(client).to receive(:call).with(field_values_sanitized, locale)
.and_return(fake_response)
caller.call
end

View File

@@ -10,8 +10,8 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume
before do
Setting["feature.remote_translations"] = true
available_locales_response = %w[de en es fr pt zh-Hans]
expect(RemoteTranslations::Microsoft::AvailableLocales).to receive(:available_locales).at_most(4).times.
and_return(available_locales_response)
expect(RemoteTranslations::Microsoft::AvailableLocales).to receive(:available_locales).at_most(4).times
.and_return(available_locales_response)
allow(Rails.application.secrets).to receive(:microsoft_api_key).and_return("123")
end

View File

@@ -35,8 +35,8 @@ module CommonActions
end
def validate_officer
allow_any_instance_of(Officing::BaseController).
to receive(:verify_officer_assignment).and_return(true)
allow_any_instance_of(Officing::BaseController)
.to receive(:verify_officer_assignment).and_return(true)
end
def fill_in_proposal
@@ -69,8 +69,8 @@ module CommonActions
def set_officing_booth(booth = nil)
booth = create(:poll_booth) if booth.blank?
allow_any_instance_of(Officing::BaseController).
to receive(:current_booth).and_return(booth)
allow_any_instance_of(Officing::BaseController)
.to receive(:current_booth).and_return(booth)
end
def click_sdg_goal(code)

View File

@@ -32,8 +32,8 @@ describe "DocumentVerifications" do
describe "Verifying througth Census" do
context "Census API" do
scenario "Verifying a user which does not exist and is not in the census shows an error" do
expect_any_instance_of(Verification::Management::Document).to receive(:in_census?).
and_return(false)
expect_any_instance_of(Verification::Management::Document).to receive(:in_census?)
.and_return(false)
login_as_manager
visit management_document_verifications_path
@@ -55,8 +55,8 @@ describe "DocumentVerifications" do
context "Remote Census API", :remote_census do
scenario "Verifying a user which does not exist and is not in the census shows an error" do
expect_any_instance_of(Verification::Management::Document).to receive(:in_census?).
and_return(false)
expect_any_instance_of(Verification::Management::Document).to receive(:in_census?)
.and_return(false)
login_as_manager
visit management_document_verifications_path