Skip to content

Add rubocop-rspec_rails support #371

Open

Description

@hashtegner

Seems that some cops were extracted from rubocop-spec to a new gem called rubocop-rspec_rails, but aparently code climate didn't support it.
Ref: rubocop/rubocop-rspec#1830

/usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:46:in `rescue in rescue in load': cannot load such file -- rubocop-rspec_rails (LoadError)
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:39:in `rescue in load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:32:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:21:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:14:in `block (2 levels) in resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `block in resolve_requires'
	from <internal:kernel>:90:in `tap'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:12:in `resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:53:in `load_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:112:in `configuration_from_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:68:in `for_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:58:in `for'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:121:in `combined_exclude_glob_patterns'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:85:in `find_files'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:59:in `target_files_in_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:38:in `block in find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/runner.rb:111:in `find_target_files'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:15:in `block in expanded_list'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `each'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `flat_map'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `expanded_list'
	from /usr/src/app/lib/cc/engine/rubocop.rb:47:in `files_to_inspect'
	from /usr/src/app/lib/cc/engine/rubocop.rb:27:in `block in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `chdir'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `run'
	from /usr/src/app/bin/codeclimate-rubocop:17:in `<main>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:148:in `require': cannot load such file -- rubocop/rspec_rails (LoadError)
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:42:in `rescue in load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:32:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:21:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:14:in `block (2 levels) in resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `block in resolve_requires'
	from <internal:kernel>:90:in `tap'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:12:in `resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:53:in `load_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:112:in `configuration_from_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:68:in `for_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:58:in `for'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:121:in `combined_exclude_glob_patterns'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:85:in `find_files'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:59:in `target_files_in_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:38:in `block in find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/runner.rb:111:in `find_target_files'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:15:in `block in expanded_list'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `each'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `flat_map'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `expanded_list'
	from /usr/src/app/lib/cc/engine/rubocop.rb:47:in `files_to_inspect'
	from /usr/src/app/lib/cc/engine/rubocop.rb:27:in `block in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `chdir'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `run'
	from /usr/src/app/bin/codeclimate-rubocop:17:in `<main>'
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:148:in `require': cannot load such file -- rubocop-rspec_rails (LoadError)
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:35:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/feature_loader.rb:21:in `load'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:14:in `block (2 levels) in resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:13:in `block in resolve_requires'
	from <internal:kernel>:90:in `tap'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader_resolver.rb:12:in `resolve_requires'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:53:in `load_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_loader.rb:112:in `configuration_from_file'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:68:in `for_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/config_store.rb:58:in `for'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:121:in `combined_exclude_glob_patterns'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:85:in `find_files'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:59:in `target_files_in_dir'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:38:in `block in find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `each'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/target_finder.rb:36:in `find'
	from /usr/local/bundle/gems/rubocop-1.56.3/lib/rubocop/runner.rb:111:in `find_target_files'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:15:in `block in expanded_list'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `each'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `flat_map'
	from /usr/src/app/lib/cc/engine/file_list_resolver.rb:13:in `expanded_list'
	from /usr/src/app/lib/cc/engine/rubocop.rb:47:in `files_to_inspect'
	from /usr/src/app/lib/cc/engine/rubocop.rb:27:in `block in run'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `chdir'
	from /usr/src/app/lib/cc/engine/rubocop.rb:26:in `run'
	from /usr/src/app/bin/codeclimate-rubocop:17:in `<main>'

Our .rubocop.yaml

require:
  - rubocop-rails
  - rubocop-rspec
  - rubocop-rspec_rails

Activity

  1. hallelujah commented on Jun 19, 2024

    @hallelujah

    It solved in #368

    I think codeclimate/this project is a bit sleeping, no activity/merges since 4 years ...

  2. rebeccafae commented on Jun 20, 2024

    @rebeccafae

    I think codeclimate/this project is a bit sleeping, no activity/merges since 4 years ...

    The channel branches have more recent activity. But they are still very slow with the updates. If you want the latest and greatest channel/beta is keeping up thanks to @BrianHawley.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions