Fix `Lint/EmptyBlock` cop (#27748)

th-downstream
Matt Jankowski 1 year ago committed by GitHub
parent b06284c572
commit cfa14ec6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,16 +20,6 @@ Layout/LineLength:
Exclude: Exclude:
- 'app/models/account.rb' - 'app/models/account.rb'
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/controllers/api/v2/search_controller_spec.rb'
- 'spec/fabricators/access_token_fabricator.rb'
- 'spec/fabricators/conversation_fabricator.rb'
- 'spec/fabricators/system_key_fabricator.rb'
- 'spec/lib/activitypub/adapter_spec.rb'
- 'spec/models/user_role_spec.rb'
Lint/NonLocalExitFromIterator: Lint/NonLocalExitFromIterator:
Exclude: Exclude:
- 'app/helpers/jsonld_helper.rb' - 'app/helpers/jsonld_helper.rb'

@ -53,7 +53,7 @@ RSpec.describe Api::V2::SearchController do
context 'without token' do context 'without token' do
describe 'GET #index' do describe 'GET #index' do
let(:search_params) {} let(:search_params) { nil }
before do before do
get :index, params: search_params get :index, params: search_params

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator :access_token, from: 'Doorkeeper::AccessToken' do Fabricator :access_token, from: 'Doorkeeper::AccessToken'
end

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator(:conversation) do Fabricator(:conversation)
end

@ -1,4 +1,3 @@
# frozen_string_literal: true # frozen_string_literal: true
Fabricator(:system_key) do Fabricator(:system_key)
end

@ -53,7 +53,7 @@ RSpec.describe ActivityPub::Adapter do
describe '#serializable_hash' do describe '#serializable_hash' do
subject { ActiveModelSerializers::SerializableResource.new(TestObject.new(foo: 'bar'), serializer: serializer_class, adapter: described_class).as_json } subject { ActiveModelSerializers::SerializableResource.new(TestObject.new(foo: 'bar'), serializer: serializer_class, adapter: described_class).as_json }
let(:serializer_class) {} let(:serializer_class) { nil }
context 'when serializer defines no context' do context 'when serializer defines no context' do
let(:serializer_class) { TestWithBasicContextSerializer } let(:serializer_class) { TestWithBasicContextSerializer }

@ -60,7 +60,7 @@ RSpec.describe UserRole do
end end
describe '#permissions_as_keys=' do describe '#permissions_as_keys=' do
let(:input) {} let(:input) { nil }
before do before do
subject.permissions_as_keys = input subject.permissions_as_keys = input

Loading…
Cancel
Save