skryukov / rubocop-gradual

Gradually improve your code with RuboCop
MIT License
36 stars 0 forks source link

Should not see `EVEN BETTER` message from CI check if the lock file only has deletions #25

Closed dgholz closed 2 months ago

dgholz commented 3 months ago

Hello, thanks for writing this tool. Recently I resolved a lot of Rubocop issues in a file, and was surprised to see a recommendation to resolve issues. Surprising because I'd resolved them all!

RuboCop Gradual got 14 issue(s) fixed, 362 left. Keep going!

Unexpected Changes!

RuboCop Gradual lock file is outdated, to fix this message:
- Run `rubocop-gradual` locally and commit the results, or
- EVEN BETTER: before doing the above, try to fix the remaining issues in those files!

`.rubocop_gradual.lock` diff:
+  "lib/my-tool/commands/subcommand.rb:3703225307": [
+    [ ... all the issues I'd removed ... ]
+  ],

In this case, I didn't need to see an encouragement to resolve remaining issues. I think that message should appear when new lines are added to the lock file.

I think perhaps instead RuboCop Gradual could skip this message if all issues for a file are resolved, if that was easier