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:
- '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:
Exclude:
- 'app/helpers/jsonld_helper.rb'

View File

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

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@ RSpec.describe ActivityPub::Adapter do
describe '#serializable_hash' do
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
let(:serializer_class) { TestWithBasicContextSerializer }

View File

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