Skip to content

Commit

Permalink
feat: add Obsession/MethodOrder cop (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranpm authored Dec 2, 2024
1 parent dd0fd9a commit e1511bb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
36 changes: 21 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PATH
specs:
sequra-style (1.2.0)
rubocop (~> 1)
rubocop-obsession (~> 0.1.11)
rubocop-performance (~> 1)
rubocop-rails (~> 2)
rubocop-rspec (~> 2)
Expand All @@ -19,28 +20,33 @@ GEM
concurrent-ruby (1.1.10)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.2)
json (2.8.2)
language_server-protocol (3.17.0.3)
minitest (5.16.3)
parallel (1.22.1)
parser (3.1.2.1)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
racc (1.8.1)
rack (3.0.0)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.1)
rexml (3.2.5)
rubocop (1.39.0)
regexp_parser (2.9.2)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.23.0, < 2.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.36.1)
parser (>= 3.3.1.0)
rubocop-obsession (0.1.11)
activesupport
rubocop (~> 1.41)
rubocop-performance (1.15.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
Expand All @@ -50,10 +56,10 @@ GEM
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.15.0)
rubocop (~> 1.33)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
unicode-display_width (2.6.0)

PLATFORMS
ruby
Expand Down
5 changes: 5 additions & 0 deletions default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-obsession

AllCops:
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
Expand Down Expand Up @@ -264,6 +265,10 @@ Style/TrivialAccessors:
Style/GuardClause:
Enabled: true

Obsession/MethodOrder:
Enabled: true
Severity: info

Performance/FlatMap:
Enabled: true

Expand Down
1 change: 1 addition & 0 deletions sequra-style.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "rubocop-performance", "~> 1"
spec.add_dependency "rubocop-rails", "~> 2"
spec.add_dependency "rubocop-rspec", "~> 2"
spec.add_dependency "rubocop-obsession", "~> 0.1.11"

spec.add_development_dependency "bundler", "~> 2.1.4"
spec.add_development_dependency "rake", "~> 13.0.1"
Expand Down

0 comments on commit e1511bb

Please sign in to comment.