diff --git a/.rubocop.yml b/.rubocop.yml index 02a0f3891..a00dccfa2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -39,6 +39,10 @@ Layout/ClassStructure: StyleGuide: '#consistent-classes' Enabled: true +Lint/DeprecatedConstants: + Description: 'Checks for deprecated constants.' + Enabled: true + Layout/DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' StyleGuide: '#consistent-multi-line-chains' @@ -125,6 +129,10 @@ Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented +Lint/RedundantDirGlobSort: + Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.' + Enabled: true + Layout/SpaceAroundMethodCallOperator: Description: 'Checks method call operators to not have spaces around them.' Enabled: true @@ -404,11 +412,10 @@ Style/Encoding: Description: 'Use UTF-8 as the source file encoding.' Enabled: false -Style/HashExcept: - Description: >- - Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods - that can be replaced with `Hash#except` method. - Enabled: true +Style/EndlessMethod: + Description: 'Avoid the use of multi-lined endless method definitions.' + StyleGuide: '#endless-methods' + Enabled: pending Style/ExponentialNotation: Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).' @@ -446,6 +453,12 @@ Style/HashEachMethods: StyleGuide: '#hash-each' Enabled: true +Style/HashExcept: + Description: >- + Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods + that can be replaced with `Hash#except` method. + Enabled: true + Style/HashLikeCase: Description: >- Checks for places where `case-when` represents a simple 1:1 diff --git a/spec/requests/comments_spec.rb b/spec/requests/comments_spec.rb index b44b88bc0..16c35f005 100644 --- a/spec/requests/comments_spec.rb +++ b/spec/requests/comments_spec.rb @@ -61,7 +61,7 @@ RSpec.describe "Comments", type: :request do expect(response.body).not_to include('') end - it "displays noindex if comment has score of less than 0" do + it "displays noindex if commentable has score of less than 0" do comment.commentable.update_column(:score, -5) get comment.path expect(response.body).to include('') diff --git a/spec/services/articles/feeds/large_forem_experimental_spec.rb b/spec/services/articles/feeds/large_forem_experimental_spec.rb index bacd39314..5c18545c0 100644 --- a/spec/services/articles/feeds/large_forem_experimental_spec.rb +++ b/spec/services/articles/feeds/large_forem_experimental_spec.rb @@ -15,7 +15,6 @@ RSpec.describe Articles::Feeds::LargeForemExperimental, type: :service do let(:tagged_article) { create(:article, tags: tag) } it "returns published articles" do - result = feed.published_articles_by_tag expect(result).to include article expect(result).not_to include unpublished_article