Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundler/OrderedGems error is not detected #43

Closed
YusukeIwaki opened this issue May 10, 2019 · 4 comments
Closed

Bundler/OrderedGems error is not detected #43

YusukeIwaki opened this issue May 10, 2019 · 4 comments

Comments

@YusukeIwaki
Copy link

I'm using Bundle/OrderedGems rule in my project.

When a gem is added to Gemfile, like below:

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.3'

gem 'bcrypt', '~> 3.1.7'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'jbuilder', '~> 2.5'
gem 'mysql2', '~> 0.5.2'
gem 'puma', '~> 3.11'
gem 'rails', '~> 5.2.2'
gem 'file_validators' # <-- added line

bundle exec rubocop shows a error:

Gemfile:13:1: C: Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem file_validators should appear before rails.
gem 'file_validators' # <-- added line
^^^^^^^^^^^^^^^^^^^^^

however with pronto-rubocop, it is now shown...

# pronto run --runner=rubocop --commit=<base commit>

How can I show error with pronto-rubocop? 🤔

Thanks

@doomspork
Copy link
Member

@YusukeIwaki can you confirm the rubocop versions you're using locally and we use in this package are the same?

@sunny
Copy link
Contributor

sunny commented May 14, 2019

It seems that this does not work since it depends on pronto's Runner#ruby_patches method which doesn't include Gemfiles.

I've pushed a PR to pronto which should fix this issue: prontolabs/pronto#344

@doomspork
Copy link
Member

Awesome @YusukeIwaki! Thank you. Your PR looks great. I'll give the other @prontolabs/core folks a day or so to comment before merging it.

@ashkulz
Copy link
Member

ashkulz commented Jan 31, 2021

This should be now available with the 0.11.0 release.

@ashkulz ashkulz closed this as completed Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants