Add protobuf code comments as Elixir module documentation - #352
Conversation
|
Alright, this should be a good starting point. It generates the code comments as expected. Code is pretty cleaned up. I think adding some work for documenting individual fields will be the next step, but we should be good here so far. Fixes #266 |
|
@btkostner Regarding your comment:
Could you elaborate on the "this does nothing" part? 😄 |
Two ways to document the fields. Add a |
@whatyouhide @wingyplus Y'all show up often in the git history of the files Blake modified, so I feel like you are the most qualified to chime in. Do either of you have a preference on field docs? I'd add you as PR reviewers but I don't have permissions. 😅 |
|
@whatyouhide @ericmj I'd really like to merge this.
Edit: found it, fixed. Would you please take a brief look before I merge? |
|
Well, I'm merging :) Thank you, @btkostner! |
This PR takes code comments from the protobuf files and add them as
@moduledocblocks. Some of the code and all of the magic numbers are taken from protokit golang library. This is the same parser logic used by https://github.com/pseudomuto/protoc-gen-doc which is pretty popular.Example generated code:
Todos:
Documentation for fields?(This does nothing, but would be nice for future improvements)