Skip to content

Commit

Permalink
bug - Move rubocop to dev folder and only load it in test & developme…
Browse files Browse the repository at this point in the history
…nt (#2596)

Fix error caused by rubocops being loaded in production.
  • Loading branch information
nudded committed Sep 17, 2024
1 parent 97a816c commit 25c66e5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require:
- rubocop-rails
- rubocop-thread_safety
- rubocop-graphql
- ./lib/cops/service_call_cop.rb
- ./dev/cops/service_call_cop.rb

inherit_gem:
standard: config/base.yml
Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
config.middleware.use(ActionDispatch::Session::CookieStore, key: '_lago_dev')
config.middleware.use(Rack::MethodOverride)

config.eager_load_paths += %W[
#{config.root}/dev
]

config.enable_reloading = true
config.eager_load = false
config.consider_all_requests_local = true
Expand Down
4 changes: 4 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
config.logger = Logger.new(nil)
config.log_level = :fatal

config.eager_load_paths += %W[
#{config.root}/dev
]

config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_dispatch.show_exceptions = :rescuable
Expand Down
File renamed without changes.

0 comments on commit 25c66e5

Please sign in to comment.