Closed marcoroth closed 3 years ago
Huh!
Looks like the rubocop.yml inheritance is not working as it should, at least in GitHub Actions with the ruby/setup-ruby
action. I wonder why this just occurs now.
Unable to find gem rubocop-discourse; is the gem installed? Gem::MissingSpecError
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:191:in `rescue in gem_config_path'
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:187:in `gem_config_path'
/home/runner/work/lhc/lhc/vendor/bundle/ruby/2.7.0/gems/rubocop-0.57.2/lib/rubocop/config_loader_resolver.rb:47:in `block (2 levels) in resolve_inheritance_from_gems'
...
Funny enough, you do not require rubocop-discourse
itself. Looking at the stacktrace it looks like some sub-dependency is probably using it (resolve_inheritance_from_gems
).
I found this rubocop issue which seems to be somewhat related: https://github.com/rubocop/rubocop/issues/5000.
But given you are running Rubocop 0.57.2
it's probably fixed in a more recent version.
@marcoroth thx for your PR. We upgraded rubocop in another PR and also included your commit there: https://github.com/local-ch/lhc/pull/197.
Hey there 👋🏼
This PR simplifies the GitHub Actions used in
lhc
. The same can probably be applied tolhs
if you like.The
ruby/setup-ruby
GitHub Action is way more superior thanactions/setup-ruby
.It has built-in bundler cache, supports way more Ruby versions and uses the Ruby version defined in
.ruby-version
plus makes the actions a lot simpler 😊