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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With