XML comment Generating for Documentation

Answered

Is there a plugin or a feature in Rider to automatically generate XML comments (like GhostDoc does) for documentation, we used to use GhostDoc but this doesn't work with Rider.

 

 

17 comments
Comment actions Permalink

Yeah, this kind of feature is supposedly built-in... like the Visual Studio for Mac, even Xamarin Studio has this feature. While Visual Studio for Mac probably is Xamarin Studio, they do generate descent summary, parameter descriptions, etc. I'm shocked Rider doesn't have this built-in nor does it have available plugins for that matter. This would really be helpful when generating XML documentations for C# projects.

0
Comment actions Permalink

I'd like this too, but I'm mostly working with F#. Typing XML doc comments from scratch without any kind of autocomplete is a bit cumbersome....

1
Comment actions Permalink

any news on this Jetbrains ?

0
Comment actions Permalink

Hi all,

At the moment, Rider can only generate a simple XML doc comment with a summary and parameter tags if you type /// near the class/method declaration. I have created a feature request for improving XML documentation mechanism, but we would like to know what are the most popular scenarios. Do you configure documentation style or use a default style? Do you create doc comments for the entire file/class at once? What are the features you miss the most in Rider? Please share your thoughts!

Mattbird4 I've created a separate issue for the completion in F# files: https://youtrack.jetbrains.com/issue/RIDER-17039

1
Comment actions Permalink

Hi Julia,

To give you some understanding from perspective (although I use Atomineer Pro, not GhostDoc although they are relatively the same):

1. For personal use, I use the default style for the most part. I make minor configuration adjustments for my own readability.

2. For business use, I nearly completely customize it based on company coding standards regarding comments.

3. Usually documenting the entire class at once is for efficiency reasons. Along with the ability to document the entire project/solution regarding a scenario of time constraints.

I hope this information helps. I would love to see it built-in to Rider or having a plug-in available for it. It's one of the few reasons why I have yet to recommend using Rider to my organization of VS2017. I'm now using Rider for personal use as it's less prone to complaint regarding plug-ins. (VS2017 is seemingly always complaining about ReSharper or some other extension that I use).

0
Comment actions Permalink

I would also love to see XML-comment related inspections for F#, like there currently are for C#. Missing XML comment for publicly visible type or member, syntax errors, etc.

0
Comment actions Permalink

+1 - Expanded XML documentation features would be very valuable to my team and I. Really basic automatic XML doc insertion based on a few metrics obtained from the assembly would serve as a good starting point.

Event better - a feature that checks the assembly for usage metrics (the same data that is already utilized for built-in code analysis tools like number of references, invocations, etc) and presents a workflow that identifies the most important/used items so that developers can prioritize documentation on those items.

0
Comment actions Permalink

Hi Skif

as you can see, the feature request still not implemented. Unfortunately, it has not been scheduled yet. You can vote for it and follow to increase the priority of the request and to be notified about all changes. Thank you for your patience!  

0
Comment actions Permalink

Hi Alexandra

Nice to meet you. Thanks for the advice, I voted. Hope this helps

0
Comment actions Permalink

Still no update? That's very sad.

 
0
Comment actions Permalink

For those looking for a very basic GhostDoc alternative I managed to build a dotnet tool (https://github.com/p1va/dotnet-document) that does a similar thing.

Then in Rider i binded CTRL+D to the execution of dotnet document apply $FILE_NAME so that i am able to generate a XML docs entry point for the entire file.

3
Comment actions Permalink

Stefano How did you bind the command to the keyboard shortcut? I searched for a way to do this but I could not find the method.

0
Comment actions Permalink

Hi Phillip Cd Jones

Have you tried to bind the shortcut in `File | Settings | Keymap`? Is it a new command from a plugin and you don't see it in the list? 

0
Comment actions Permalink

Stefano thank you!

Now, full solution for primitive XML doc:

1. Install this tool: https://github.com/p1va/dotnet-document
2. In Rider go to File > Settings > Tools | External Tools and add new external tool. Fields:
Name:DotnetDocument
Program:dotnet
Arguments:document apply $FilePath$
Working directory:$ProjectFileDir$
3. In Rider go to File > Settings > Keymap and in search field enter:DotnetDocument and add keyboard shortcut. For example: Ctrl + Shift + D
4. Enjoy

0
Comment actions Permalink

@Alexandra Guk, Stefano mentioned a console program to do the formatting and said he binded it to control D. Not sure how to bind a console program command in the keymap (it's not a plugin)

0
Comment actions Permalink

Hi Phillip Cd Jones! Thank you for the answer. It seems like the guide from @Skif works for me. Does it work for you? 

0

Please sign in to leave a comment.