skipkayhil / rails-bin

Scripts for working with Rails
MIT License
0 stars 0 forks source link

Check if new notification events are documented #1

Open zzak opened 1 year ago

zzak commented 1 year ago

Similar to check-config-docs, I think it would be nice if we made sure new notifications were documented.

For example: https://github.com/rails/rails/pull/46603#discussion_r1096511099

skipkayhil commented 1 year ago

This one may be tough to get high coverage on. Using my current method of AST parsing will be tough because there is so much variety in how hooks are defined. The ideal case looks something like this:

ActiveSupport::Notifications.instrument("process_action.action_dispatch", payload)

because we can easily extract the string, but in reality we have

I'll push up a script to get all of the easy ones once I refine it a bit more, but this may end up requiring a new approach 🤔