Skip to content
ptittof57 edited this page Aug 15, 2015 · 6 revisions
<title>SA1650: ElementDocumentationMustBeSpelledCorrectly</title> <script src="script/helpstudio.js" type="text/javascript"></script> <script src="script/StandardText.js" type="text/jscript"></script>
<script type="text/jscript">WritePageTop(document.title);</script>

TypeName

ElementDocumentationMustBeSpelledCorrectly

CheckId

SA1650

Category

Documentation Rules

Cause

The element documentation for the element contains one or more spelling mistakes or unrecognized words.

Rule Description

A violation of this rule occurs when the element documentation contains spelling mistakes:

/// <summary>

/// Joinsnames

/// </summary>

/// <param name="firstName">The first name.</param>

/// <param name="lastName">The last name.</param>

/// <returns>Name</returns>

public string JoinNames(string firstName, string lastName)

{

...

}

The spelling is checked using the culture specified in the Settings.StyleCop file (and en-US by default).

In this example the word Joinsnames in the summary element is misspelled. Either correct the spelling, insert any C# names in <c> </c> elements, suppress the violation or add the Joinsnames to a CustomDictionary.xml file.

CustomDictionary.xml files can contain words that the spelling checker does not normally recognise.

            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>The CustomDictionary.xml file should be placed in the same folder as the 
                StyleCop.dll and the Rules. That folder (and all subfolders) are checked for the 
                dictionary files.</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>StyleCop loads CustomDictionary.xml, CustomDictionary.en-GB.xml and then 
                CustomDictionary.en.xml (where en-GB is the culture specified in the 
                Settings.StyleCop file).</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>StyleCop also loads custom.dic, custom.en-GB.dic and then custom.en.dic 
                (where en-GB is the culture specified in the Settings.StyleCop file).</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>Recognized words can also be added to the Settings.StyleCop file using the 
                Settings Editor on the spelling tab.</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>Attribute values in the documentation xml of the element are not checked 
                for spelling.</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>Any text inside &lt;c&gt; &lt;/c&gt; or &lt;code&gt; &lt;/code&gt; elements is also ignored.</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                
            </P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <o:p>Any text starting with and ending with &#39;$&#39; or starting and ending with &#39;$$&#39; 
                is also ignored. i.e. $$(thtp kthpo kthpk)$$.</o:p></P>
            <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: normal; mso-vertical-align-alt: auto; mso-layout-grid-align: none">
                <SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes">
                </SPAN></P>
            
            
            <P></P>
            <H2>How to Fix Violations</H2>
            <P>To fix a violation of this rule, correct any spelling mistakes in the element 
                documentation.</P>
            <h2>How to Suppress Violations</h2>
            <pre>[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed.")]</pre>
        </div></div>
</body>
Clone this wiki locally