views:

348

answers:

2

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?

+3  A: 

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.

dove
+2  A: 

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.

Andy McCluggage