1

Because of these two KB articles, I am confused:

I have a property named ICD9. My code analysis says that I have to change it to Icd enter image description here

That sounds reasonable to me. I go and change it to Icd9 (I am not sure why it's suggesting Icd not Icd9) and I get a different warningenter image description here

The KB says if my acronym is three-letter long I should use Pascal casing. Isn't Icd9 Pascal cased? I feel that 9 has causing the issue.

Rami Alshareef
  • 7,015
  • 12
  • 47
  • 75
  • What is `ICD9`? Will another developer, working on your code, know what it means? If not, perhaps a longer, properly spelled, property is needed? If it's a common acronym in your industry, then add it to the custom dictionary. – David Arno Jul 11 '15 at 19:45
  • 1
    ICD is a short-hand for `International Classification of Diseases` I added it to a custom dictionary file. That works for now. I will have to check on Monday if the company already has a dictionary so I add it to the existing dic. – Rami Alshareef Jul 11 '15 at 19:48

1 Answers1

4

The first warning is because ICD is not the dictionary as an acronym, so it tells you not to use all caps.

The second warning is because ICD is not in the dictionary at all, so it thinks it is a misspelled word.

Either add ICD to the custom dictionary (as a normal word to get rid of the second warning or as a acronym and you can switch back to ICD9 and get rid of the first warning), or try to avoid short acronym names and use a longer more descriptive name for the property that uses words that are in the dictionary.

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
  • I thought the first warning was about the casing not being found in the dic, From the fix section `Change the name so that it is cased correctly.` I agree on your comment about the next warning, I just tried to use only `Icd` and I got the same `CA1704` warning. I will give the `custom dictionary` shot and see how it goes. – Rami Alshareef Jul 11 '15 at 19:17