Can you configure VS2008 Code Analysis to use a British English Dictionary?
VS2008 Code Analysis will flag a spelling mistake in an identifier using the IdentifiersShouldBeSpelledCorrectly
warning type.
This process is using an American dictionary by default because words are being flagged that are correctly spelt using the British spelling. For example, words like "Organisation" and "Customisation", etc...
I am aware that you can create your own custom Xml dictionary files that contain any words you don't want to be flagged, however, can anyone tell me if you can configure Code Analysis to use a different default (or additional) dictionary from those available in Windows?
Excellent, thanks.
A summary of the solution is...
Add the CodeAnalysisCulture
line to the Project file. Unfortunately I think this has to be done for every project being analysed...
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisCulture>en-GB</CodeAnalysisCulture>
...
with "en-GB" as the value to get British English spellchecking.
This should do it for you Visual Studio 2008 - Spelling rules
So simply replace en-AU with en-GB in the example given.
It quotes the rule IdentifiersShouldBeSpelledCorrectly.
链接地址: http://www.djcxy.com/p/69032.html上一篇: C#锁和代码分析警告CA2002