Severity - Warning
Check method - Here
HasDescriptionAttribute check ensures that a method has a
Description attribute explaining what the method is doing for users.
You can add a
Description attribute with the following syntax sitting above the method:
[Description("Your description here")]
If you have not used any attributes in your file previously, you may need to add the following usings:
Description authoring guidelines
We should be aiming for all properties, objects and methods to have a description. With only the very simplest of self explanatory properties to not require a description by exception - and indeed only where the below guidelines can not be reasonably satisfied.
So what makes a good description?
- A description must impart additional useful information beyond the property name, object and namespace.
- Further to a definition, the description is an opportunity to include usage guidance, tips or additional context.
- The description is a place you can include synonyms etc. to help clarify for others in different regions/domains, being inclusive as possible.
- Also don't forget the addition of a Quantity Attribute can be used now, appropriate for Doubles and Vectors.
Last update: March 17, 2023