From b7b52328359b71b5247581e377956c9df5232753 Mon Sep 17 00:00:00 2001 From: rhymes Date: Wed, 10 Apr 2019 18:17:05 +0200 Subject: [PATCH] Rubocop: regenerate todo and fix RSpec/FilePath (#2358) * Regenerate rubocop todo * Fix RSpec/FilePath --- .rubocop.yml | 3 + .rubocop_todo.yml | 59 ++++++++----------- .../{raw_tag_spec.rb => liquid/raw_spec.rb} | 0 3 files changed, 28 insertions(+), 34 deletions(-) rename spec/liquid_tags/{raw_tag_spec.rb => liquid/raw_spec.rb} (100%) diff --git a/.rubocop.yml b/.rubocop.yml index dec694c154fdc..e3eee16cbf013 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -182,5 +182,8 @@ Rails/HasAndBelongsToMany: Description: 'Prefer has_many :through to has_and_belongs_to_many.' Enabled: false +Rails/HasManyOrHasOneDependent: + Enabled: false + Rails/SkipsModelValidations: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1702df2106cf6..f34fdfe619a0c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,32 +1,48 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-02-02 16:50:41 +0100 using RuboCop version 0.63.1. +# on 2019-04-10 05:04:16 +0200 using RuboCop version 0.67.2. # 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: 8 +# Offense count: 10 # Configuration parameters: CountComments, ExcludedMethods. # ExcludedMethods: refine Metrics/BlockLength: Max: 69 -# Offense count: 18 +# Offense count: 21 Metrics/PerceivedComplexity: - Max: 15 + Max: 13 # Offense count: 1 -# Configuration parameters: CustomTransform, IgnoreMethods. -RSpec/FilePath: +RSpec/AnyInstance: Exclude: - - 'spec/liquid_tags/raw_tag_spec.rb' + - 'spec/requests/stripe_cancellations_spec.rb' -# Offense count: 20 +# Offense count: 145 # Configuration parameters: AggregateFailuresByDefault. RSpec/MultipleExpectations: Max: 6 +# Offense count: 16 +Rails/OutputSafety: + Exclude: + - 'app/controllers/stripe_subscriptions_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/comments_helper.rb' + - 'app/labor/markdown_parser.rb' + - 'app/liquid_tags/dev_comment_tag.rb' + - 'app/liquid_tags/github_tag/github_issue_tag.rb' + - 'app/liquid_tags/liquid_tag_base.rb' + - 'app/liquid_tags/tweet_tag.rb' + - 'app/models/comment.rb' + - 'app/models/display_ad.rb' + - 'app/models/message.rb' + - 'app/views/api/v0/articles/show.json.jbuilder' + - 'app/views/articles/feed.rss.builder' + # Offense count: 15 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. @@ -49,33 +65,8 @@ Style/ClassAndModuleChildren: - 'app/controllers/notifications/counts_controller.rb' - 'app/controllers/notifications/reads_controller.rb' -RSpec/AnyInstance: - Exclude: - - 'spec/requests/stripe_cancellations_spec.rb' - -# Offense count: 1283 +# Offense count: 1754 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: Max: 279 - -Rails/HasManyOrHasOneDependent: - Enabled: false - -# Potential security risks -# Offense count: 16 -Rails/OutputSafety: - Exclude: - - 'app/controllers/stripe_subscriptions_controller.rb' - - 'app/helpers/application_helper.rb' - - 'app/helpers/comments_helper.rb' - - 'app/labor/markdown_parser.rb' - - 'app/liquid_tags/dev_comment_tag.rb' - - 'app/liquid_tags/github_tag/github_issue_tag.rb' - - 'app/liquid_tags/liquid_tag_base.rb' - - 'app/liquid_tags/tweet_tag.rb' - - 'app/models/comment.rb' - - 'app/models/display_ad.rb' - - 'app/models/message.rb' - - 'app/views/api/v0/articles/show.json.jbuilder' - - 'app/views/articles/feed.rss.builder' diff --git a/spec/liquid_tags/raw_tag_spec.rb b/spec/liquid_tags/liquid/raw_spec.rb similarity index 100% rename from spec/liquid_tags/raw_tag_spec.rb rename to spec/liquid_tags/liquid/raw_spec.rb