rubocop / rubocop

A Ruby static code analyzer and formatter, based on the community Ruby style guide.

Home Page:https://docs.rubocop.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New cops warning still show up even after they have been configured

doudou opened this issue · comments

My apologies, I tried to reduce the test case to a minimum, but couldn't manage to make it trigger with a simple repo and config ...

If I run rubocop 1.60.2 on the rubocop_new_cops branch of https://github.com/rock-core/tools-roby, the new cops (that are configured in either .rubocop.yml and .rubocop_todo.yml) are still displayed as warnings.

To reproduce:

git clone https://github.com/rock-core/tools-roby -b rubocop_new_cops --depth 1
cd tools-roby
bundle install --path vendor
bundle exec rubocop

Another weird thing (compared to running rubocop with the same config on an empty repo) is that the warning appears twice.

How are you runnig 1.60.2 in your repo? Your gemspec requires ruby 2.5 while this rubocop version requires at least 2.7. If I remove the version constraint I'm getting 0.83.0 because rubocop-rock depends on RuboCop < 1.0