socketry / nio4r

Cross-platform asynchronous I/O primitives for scalable network clients and servers.
Other
965 stars 86 forks source link

`.rubocop.yml` raising error on circleCI with ruby 2.7 #232

Closed jsugarman closed 4 years ago

jsugarman commented 4 years ago

What

bundle exec rubocop is raising the error below against a consuming repo (a rails 6.0.2.1 app) when run on circleCI, but not locally.

#!/bin/bash -eo pipefail
bundle exec rubocop
vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.2/.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout
Error: The `Lint/HandleExceptions` cop has been renamed to `Lint/SuppressedException`.
(obsolete configuration found in vendor/bundle/ruby/2.7.0/gems/nio4r-2.5.2/.rubocop.yml, please update it)
tarcieri commented 4 years ago

Why are you running RuboCop on third party gems?

edwinthinks commented 4 years ago

@jsugarman I had the same issue and it turns out that rubocop is running on dependencies (as @tarcieri was probably eluding too) in your vendor folder that only shows up in your CI probably.

To address this I added this to my .rubocop.yml file

AllCops:
  Exclude:
    - 'vendor/**/*'

Although I am not sure why the default was not being picked up - https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml#L60-L62 . Perhaps, it is because I overrode it with my own Exclude: value.

Either way, this doesn't seem to be an issue with this gem.