DanielHWe / sonar-fxcop

FxCop plugin for C# or VB.NET projects
14 stars 6 forks source link

How to use a CustomDictionary to avoid convention naming errors #20

Closed jrodrigv closed 6 years ago

jrodrigv commented 6 years ago

Hi,

I'm not sure if this is supported or not, but I'm trying to use a CustomDictionary to avoid some naming / casing errors but I'm not sure how to achieve it.

I have placed the Dictionary.xml in the same folder where the SLN file is located.

And these are the parameters that I'm using.

sonar.cs.fxcop.slnFile=$(Build.SourcesDirectory)\Units\solution.sln sonar.cs.fxcop.fxCopCmdPath=C:/Program Files (x86)/Microsoft Visual Studio 14.0/Team Tools/Static Analysis Tools/FxCop/FxCopCmd.exe sonar.cs.fxcop.directory=bin\debug

DanielHWe commented 6 years ago

Hi,

I think you have to update the global diconary of FxCopCmd.exe because these exe is used for the scan. May be it is ok to add the file to the project, but I'm not sure if FxCopCmd will load it. Please see https://social.msdn.microsoft.com/Forums/en-US/ad456ab7-10e9-474f-a695-c32f9c37d6df/adding-words-in-fxcop-custom-dictionary?forum=vstscode for more information.