Force Rider to enforce code commenting

Answered

Hi All

 

Just working with rider to try and get more consistency across my code. Just wondering if there is a way for rider to mark it as a warning when you have no got a summery comment associated with a class/function? Had a look through the settings and nothing jumped out but will be intersting to know if there is as i would find this really useful in remembering to do it for documentation

 

Thanks

0
1 comment

Hi Thomas,

Yes, this is possible, yet not intuitive:

Add DocumentationFile tag to your csproj. Ex.:

<PropertyGroup>
        <DocumentationFile>bin\debug\ClassLibrary.xml</DocumentationFile>
</PropertyGroup>

Now Rider will show a warning saying that XML comment is missing. Put the cursor on the warning and press Alt-Enter to generate documentation. 

 

0

Please sign in to leave a comment.