nshki / chusaku

Annotate your Rails controllers with route info.
https://rubygems.org/gems/chusaku
MIT License
87 stars 4 forks source link

Add CLI flags #8

Closed igas closed 4 years ago

igas commented 4 years ago

Hi!

Thank you for the great tool. We recently adopted it and very happy with the result. One thing we stumbled upon is automation.

Current behaviour is to annotate everything and report all of the files. If someone added new route and did not know that chusaku needs to be invoked, we'll have synchronisation issue between comments and code.

There are couple solutions I see:

To be able to do it we need a way to report back on changes (status code, what was changed).

I added couple of flags to be able to achieve this.

What do you think?

igas commented 4 years ago

@nshki thank you for your review. I'll try to address it in the couple of days.

igas commented 4 years ago

I've implemented simple CLI, I've decided to go with straightforward solution to not overcomplicate thing while we don't need a lot from it.

Was considering providing developers a way to easily install a pre-commit hook. What are your thoughts on that?

I think there are many solutions to this problem, imo it's better to use things like: https://github.com/Arkweid/lefthook or https://github.com/sds/overcommit and either contribute there or add it to readme/docs on how to do it.