How to suppress stylecop error SA1650 (incorrectly spelled words)

Viewed 6746

I have a documentation header on a class, that has words that are not spelled correctly according to stylecop. They are code specific and need to be there, though.

Error SA1650 : CSharp.Documentation : The documentation text within the summary tag contains incorrectly spelled words: ...

I wish to suppress the error. How can I do this?

2 Answers

Using SuppressMessage to suppress warnings on words that are domain specific is a solution. However you need to add the attribute to all methods that contain those words.

It is IMHO better to implement a custom dictionary so that all instances of those words are ignored by the analysers and never generate warnings.

https://msdn.microsoft.com/en-us/library/bb514188.aspx describes the process of adding a custom dictionary - see the end of the article and pay particular attention to the build action. The article also describes the structure of the XML and what to do to resolve specific warnings.

Related