Naming convention and FxCop question

  • Thread starter Thread starter parez
  • Start date Start date
P

parez

Hi,

My namespace looks like

DDD.DEF.Something.Otherthing

DDD is abbreviation for the company name and DEF for the product
name.

FxCop is asking me to change it Ddd.Def.Something.Otherthing.

Is it not ok to ignore pascal casing for abbreviations?

TIA
 
Is it not ok to ignore pascal casing for abbreviations?
As I recall, the recommendation distinguishes between <= 2, and >= 3
characters, i.e. IP, but Tcp; however, I think you could argue strongly
when it comes to company names. As an example, I use a tool by ILOG -
and it is in an ILOG namespace.

At the end of the day, it is your code; if in doubt, perhaps lean
towards clarity and constistency, whichever that is...

Nobody is going to drop on you, unless your company is called "System",
and your product is called "Collections" ;-p

Marc
 
Is it not ok to ignore pascal casing for abbreviations?

Also, if you choose to ignore, and didn't already know, it may be more
convenient to add the abbrivation to the CustomDictionary.xml, found
in the FxCop folder (If your using VS Team Suite built in code
analysis its "C:\Program Files\Microsoft Visual Studio 9.0\Team Tools
\Static Analysis Tools\FxCop\".

It would be added to the "<Acronyms>" > "<CasingExceptions>" section.
Some default values for this area are like "NESW" for "North East
South West", etc, and would then be applied to all projects you open,
which might be what you want for something like a company name.

NB
 
parez said:
My namespace looks like

DDD.DEF.Something.Otherthing

DDD is abbreviation for the company name and DEF for the product
name.

FxCop is asking me to change it Ddd.Def.Something.Otherthing.

Is it not ok to ignore pascal casing for abbreviations?

Seems perfectly valid to me.

If DDD and DEF were (english) words, then you should
capitalize them per coding convention.

But acronyms are always all uppercase.

The .NET coding convention from MS is important, but they
can not require IBM to call them Ibm.

So this is one of the VERY FEW exceptions where I would
not recommend following the coding convention to the letter.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top