socketry/nio4r

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

jsugarman opened this issue ยท 2 comments

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)

Why are you running RuboCop on third party gems?

@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.