buf icon indicating copy to clipboard operation
buf copied to clipboard

COMMENT_MESSAGE Lint rule exceptions for request/response types

Open sarahegler opened this issue 2 years ago • 3 comments

Prototool has a lint rule MESSAGES_HAVE_SENTENCE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES.

Is there a way to achieve this same level of linting in buf? It seems that COMMENT_MESSAGE requires a comment for every message type, including RPC request/response message types.

If not, is this something you would consider adding?

sarahegler avatar May 04 '22 20:05 sarahegler

Thanks for issue @sarahegler - we'd definitely consider adding this one.

We'd probably just name it COMMENT_MESSAGE_EXCEPT_REQUEST_RESPONSE_TYPES in our case (for consistency with the rest of our lint rules). You'll need to configure it explicitly though - we won't add it to any of the lint categories that already exist (e.g. DEFAULT) since that'd be a backwards incompatible change.

We might not get to this immediately due to some other priorities, but stay tuned and we'll try to get this change in soon!

amckinney avatar May 04 '22 21:05 amckinney

thanks so much @amckinney!

sarahegler avatar May 04 '22 21:05 sarahegler

I started working on this issue in https://github.com/bufbuild/buf/pull/1191 - it's non-trivial, but consider this accepted as an issue we should work on eventually.

bufdev avatar Jan 14 '23 19:01 bufdev