Fix Lint/EmptyBlock cop (#27748)

This commit is contained in:
Matt Jankowski 2023-11-07 04:11:04 -05:00 committed by GitHub
parent b06284c572
commit cfa14ec6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 6 additions and 19 deletions

View File

@ -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'

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

@ -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 }

View File

@ -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