Disabling FxCop errors globally in TeamCity

Ok, another FxCop question for today.

I read the arguments regarding the IdentifiersShouldBeCasedCorrectly rule and whether it should be "XML" or "Xml". Well, I'm the XML guy and I want to stay that way. Therefore, I do not want FxCop to correct me all the time.

I use the SuppressMessage attribute only for certain cases. I also used FxCop to mark a ton of errors and copied them as a “module” of the SuppressMessage level in assemblyinfo.cs. It works very well.

However, now I really want to globally disable this annoying IdentifiersShouldBeCasedCorrectly rule. I am using TeamCity 5.0.3 and not using the FxCop project file (however, I could do this). I was hoping I could pass the FxCopCmd parameter so that it ignores this error, but this does not look like the documentation.

So ... is there anything I can do without creating the FxCop project file on the TeamCity build server and using it for the FxCop build runner?

+2
source share
1 answer

FxCop ( c:/program/microsoft fxcop 1.36). CustomDictionary.xml. XML CasingExceptions CustomDictionary.xml, XML- (, , CustomDictionary.xml ).

CustomDictionary.xml XML CasingExceptions . , , FxCop .

TeamCity, FxCop , ( ), CustomDictionary.xml FxCop.

:

  <Acronyms>
<CasingExceptions>
  <Acronym>Pi</Acronym>
  <Acronym>Na</Acronym>   <!-- NaN -->
  <Acronym>NESW</Acronym> <!-- North East South West -->
  <Acronym>NWSE</Acronym> <!-- North West South East -->
  <Acronym>XML</Acronym> <!-- XML -->
</CasingExceptions>

MSDN FxCop , !

0

Source: https://habr.com/ru/post/1739008/


All Articles