fohte / rubocop-daemon

Makes RuboCop faster
MIT License
222 stars 26 forks source link

Restart server automatically on config change #37

Open tdeo opened 3 years ago

tdeo commented 3 years ago

Hello,

I noticed some inconsistencies when using rubocop-daemon and changing rubocop's config file, the changes aren't reloaded until I restart the server.

I looked a bit around Rubocop, and there doesn't seem to be an API to reload the whole config. I'm quite willing to look into making a PR for that - I believe it could be implement in ClientCommand::Base#ensure_server! by appending a first line like ClientCommand::Stop.new([]).run if Daemon.configuration_obsolete? and having a configuration_checksum of some sort handled by Cache.

Do you think that is the right direction ? Would you have any other suggestions for implementing that behavior?