Routine rubocop fixes (#8137)
* Update gems * rubocop -a * rubocop --auto-gen-config
This commit is contained in:
parent
5e3f645d29
commit
689fb6efb6
5 changed files with 8 additions and 17 deletions
|
|
@ -14,6 +14,7 @@ AllCops:
|
|||
- db/migrate/*.rb
|
||||
- node_modules/**/*
|
||||
- tmp/**/*
|
||||
- vendor/**/*
|
||||
DisplayStyleGuide: true
|
||||
ExtraDetails: true
|
||||
TargetRubyVersion: 2.7
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ require:
|
|||
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2020-05-22 10:44:28 +0200 using RuboCop version 0.84.0.
|
||||
# on 2020-05-28 18:37:09 +0200 using RuboCop version 0.84.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 268
|
||||
# Offense count: 273
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
Metrics/AbcSize:
|
||||
Max: 64
|
||||
|
|
@ -40,7 +40,7 @@ RSpec/ExampleLength:
|
|||
- 'spec/models/comment_spec.rb'
|
||||
- 'spec/requests/display_ad_events_spec.rb'
|
||||
|
||||
# Offense count: 855
|
||||
# Offense count: 866
|
||||
RSpec/MultipleExpectations:
|
||||
Max: 12
|
||||
|
||||
|
|
@ -74,23 +74,15 @@ Rails/OutputSafety:
|
|||
- 'app/models/display_ad.rb'
|
||||
- 'app/models/message.rb'
|
||||
|
||||
# Offense count: 17
|
||||
# Offense count: 7
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/UniqueValidationWithoutIndex:
|
||||
Exclude:
|
||||
- 'app/models/article.rb'
|
||||
- 'app/models/badge_achievement.rb'
|
||||
- 'app/models/chat_channel.rb'
|
||||
- 'app/models/chat_channel_membership.rb'
|
||||
- 'app/models/collection.rb'
|
||||
- 'app/models/comment.rb'
|
||||
- 'app/models/data_update_script.rb'
|
||||
- 'app/models/follow.rb'
|
||||
- 'app/models/github_repo.rb'
|
||||
- 'app/models/notification.rb'
|
||||
- 'app/models/organization.rb'
|
||||
- 'app/models/response_template.rb'
|
||||
|
||||
# Offense count: 33
|
||||
# Cop supports --auto-correct.
|
||||
|
|
@ -106,7 +98,7 @@ Style/SingleLineBlockParams:
|
|||
Exclude:
|
||||
- 'app/labor/markdown_fixer.rb'
|
||||
|
||||
# Offense count: 534
|
||||
# Offense count: 533
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class GithubTag
|
|||
|
||||
validate_options!(*options)
|
||||
|
||||
path.gsub!(%r{/\z}, "") # remove optional trailing forward slash
|
||||
path.delete_suffix!("/") # remove optional trailing forward slash
|
||||
repository_path = URI.parse(path)
|
||||
repository_path.query = repository_path.fragment = nil
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
# rubocop:disable RSpec/ExampleLength
|
||||
# rubocop:disable RSpec/MultipleExpectations
|
||||
require "rails_helper"
|
||||
require Rails.root.join("lib/data_update_scripts/20200519142908_re_index_feed_content_and_users_to_elasticsearch.rb")
|
||||
|
||||
|
|
@ -33,4 +32,3 @@ describe DataUpdateScripts::ReIndexFeedContentAndUsersToElasticsearch do
|
|||
end
|
||||
end
|
||||
# rubocop:enable RSpec/ExampleLength
|
||||
# rubocop:enable RSpec/MultipleExpectations
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ require "rails_helper"
|
|||
RSpec.describe "User index", type: :system do
|
||||
let!(:user) { create(:user, username: "user3000") }
|
||||
let!(:article) { create(:article, user: user) }
|
||||
let!(:other_article) { create(:article, title: rand(10000000).to_s) }
|
||||
let!(:other_article) { create(:article, title: rand(10_000_000).to_s) }
|
||||
let!(:comment) { create(:comment, user: user, commentable: other_article) }
|
||||
let(:organization) { create(:organization) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue