Fix analytics event documentation formatting#11727
Conversation
- "Email and Password Authentication" description was wrong - Similar to #11640 changelog: Internal, Documentation, Fix documentation formatting
c42174a to
7561d6a
Compare
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍
Another idea for enforcing this: Maybe we can require that the method description starts uppercase? That might be enough of a hint to people in scenarios like this.
Oh that's a great idea! Let me give that a shot |
Ok so after doing that, a few updates!
The errors now look like which hopefully is clear to future us what we are trying to fix |
| description = method_description(method_object) | ||
| if description.present? && !method_object.docstring.match?(/\A[A-Z]/) | ||
| errors << "#{error_prefix} method description starts with lowercase, check indentation" | ||
| end |
There was a problem hiding this comment.
Could we include the parsed description in the error message so it'll be even more obvious if the description includes param text? For context, I was previously unaware of the indentation requirement, so "check indentation" probably wouldn't have been enough for me to realize if a description includes parameter text.
There was a problem hiding this comment.
How about 24e3453, which would look like this:
app/services/analytics_events.rb:249 add_email_confirmation method description starts with lowercase, check indentation:
selection.
A user has clicked the confirmation link in an email"
Before
The description included some notes from the
new_deviceattributeAfter
The description is only the description