DmitryTsepelev / rubocop_director

Plan your refactorings properly
MIT License
74 stars 4 forks source link

Use with rubocop-gradual? #17

Open pboling opened 1 year ago

pboling commented 1 year ago

The rubocop-todo.yml pattern has a number of problems that make it less than ideal.

rubocop-gradual solves the problems inherent with rubocop-todo.yml, primarily, by using a lockfile, similar to bundler.

See: https://github.com/skryukov/rubocop-gradual

Because it discards with the entire concept of rubocop-todo.yml, replacing it with something better, would a project using rubocop_gradual would be unable to use rubocop_director?

DmitryTsepelev commented 1 year ago

Hey @pboling! I think that's right unless someone adds an adapter 🙂 The only place it's used is https://github.com/DmitryTsepelev/rubocop_director/blob/master/lib/rubocop_director/rubocop_stats.rb where we grab stats (and one another place where we make a copy, but that might be not needed).

So the plan would be:

  1. add a config option/just detect that gradual is in the bundle
  2. use a different stats fetcher
  3. profit
pboling commented 1 year ago

Thanks for the explanation! If I ever have spare cycles, I may look into it ❤️