Skip to content

Commit

Permalink
Updates Rubocop Rails to 2.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
camilopayan committed Dec 27, 2023
1 parent 24bc50f commit 3205340
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Unreleased

- Update Rubocop Rails to [v2.23.1](https://github.com/rubocop/rubocop-rails/releases/tag/v2.23.1)
- First time fully configured. This was done partly in consultation at [Test Double](https://testdouble.com/) and partly through [this fantastic RailsConf talk in 2023](https://www.youtube.com/watch?v=QVilOzkLdlI)!

## [0.2.0]

- Update Rubocop Rails to [v2.20.2](https://github.com/rubocop/rubocop-rails/releases/tag/v2.20.2)
Expand Down
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
standard-rails (0.2.0)
lint_roller (~> 1.0)
rubocop-rails (~> 2.20.2)
rubocop-rails (~> 2.23.1)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -48,15 +48,16 @@ GEM
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.20.2)
rubocop-rails (2.23.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
standard (1.31.0)
language_server-protocol (~> 3.17.0.2)
Expand Down
29 changes: 29 additions & 0 deletions config/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ AllCops:
Lint/RedundantSafeNavigation:
Enabled: false

Lint/SafeNavigationChain:
Enabled: true
AllowedMethods:
- present?
- blank?
- presence
- presence_in
- try
- try!
- in?

Rails/ActionControllerFlashBeforeRender:
Enabled: false

Expand Down Expand Up @@ -100,6 +111,9 @@ Rails/ContentTag:
Rails/CreateTableWithTimestamps:
Enabled: true

Rails/DangerousColumnNames:
Enabled: true

Rails/Date:
Enabled: true

Expand Down Expand Up @@ -140,6 +154,9 @@ Rails/EnumHash:
Rails/EnumUniqueness:
Enabled: true

Rails/EnvLocal:
Enabled: true

Rails/EnvironmentComparison:
Enabled: true

Expand Down Expand Up @@ -266,6 +283,9 @@ Rails/RakeEnvironment:
Rails/ReadWriteAttribute:
Enabled: true

Rails/RedundantActiveRecordAllMethod:
Enabled: false

Rails/RedundantAllowNil:
Enabled: true

Expand Down Expand Up @@ -335,6 +355,9 @@ Rails/SchemaComment:
Rails/ScopeArgs:
Enabled: true

Rails/SelectMap:
Enabled: false

Rails/ShortI18n:
Enabled: false

Expand Down Expand Up @@ -387,6 +410,9 @@ Rails/UnknownEnv:
Rails/UnusedIgnoredColumns:
Enabled: true

Rails/UnusedRenderContent:
Enabled: true

Rails/Validation:
Enabled: true

Expand All @@ -404,3 +430,6 @@ Rails/WhereNot:

Rails/WhereNotWithMultipleConditions:
Enabled: false

Style/InvertibleUnlessCondition:
Enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# of RuboCop built-in cops in this file, we need to monitor it for changes
# in rubocop-rails and keep it up to date.
#
# Last updated from rubocop-rails v2.20.2
# Last updated from rubocop-rails v2.23.1

# frozen_string_literal: true

Expand All @@ -29,6 +29,14 @@

RuboCop::Cop::Style::HashExcept.minimum_target_ruby_version(2.0)

RuboCop::Cop::Style::InverseMethods.singleton_class.prepend(
Module.new do
def autocorrect_incompatible_with
super.push(RuboCop::Cop::Rails::NegateInclude)
end
end
)

RuboCop::Cop::Style::MethodCallWithArgsParentheses.singleton_class.prepend(
Module.new do
def autocorrect_incompatible_with
Expand Down
2 changes: 1 addition & 1 deletion standard-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "lint_roller", "~> 1.0"
spec.add_dependency "rubocop-rails", "~> 2.20.2"
spec.add_dependency "rubocop-rails", "~> 2.23.1"
end

0 comments on commit 3205340

Please sign in to comment.