-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathXmldocMissing.qhelp
59 lines (48 loc) · 2.14 KB
/
XmldocMissing.qhelp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
Public APIs (including methods, constructors, classes, structs and interfaces) should be documented
to help make the API easier to understand and maintain. For the purpose of code maintainability,
it is also advisable to document non-public APIs.
</p>
</overview>
<recommendation>
<p>
Add appropriate documentation. The documentation comment should describe
<em>what</em> the method or constructor does rather than <em>how</em> it does it,
to allow for any potential implementation change that is
invisible to users of an API. It should include the following:</p>
<ul>
<li>A <code><summary></code> tag giving a brief description of the class or method</li>
<li><code><param></code> tags to describe all arguments to methods and constructors</li>
<li>A <code><returns></code> tag if the method returns a value</li>
<li><code><exception></code> tags for all exceptions thrown by the method</li>
<li><code><typeparam></code> tags for type parameters to classes and methods</li>
<li>A description of any preconditions or postconditions</li>
<li>Any other important aspects such as side-effects and thread safety</li>
</ul>
<p>
Documentation for users of an API should be written using the standard documentation format.
This can be accessed conveniently by users of an API from within standard IDEs,
and can be transformed automatically into HTML format.
</p>
</recommendation>
<example>
<p>The following example shows a fully documented class, illustrating the use of
<code><summary></code>, <code><param></code>, <code><returns></code>,
and <code><exception></code> tags.
</p>
<sample src="XmldocExample.cs" />
</example>
<references>
<li>
MSDN, C# Programming Guide:
<a href="http://msdn.microsoft.com/en-us/library/b2s063f7.aspx">XML Documentation Comments</a>,
<a href="http://msdn.microsoft.com/en-us/library/z04awywx.aspx">How to: Use the XML Documentation Features</a>,
<a href="http://msdn.microsoft.com/en-us/library/5ast78ax.aspx">Recommended Tags for Documentation Comments</a>.
</li>
</references>
</qhelp>