Questions tagged [gendarme]

Gendarme is a tool to find defects inside .NET (ECMA CIL) applications and libraries.

Gendarme is a tool to find defects inside applications and libraries. Gendarme inspects assemblies code and metadata in ECMA CIL format (Mono and .NET) and looks for common problems with the code, problems that compiler do not typically check or have not historically checked. Gendarme uses the Cecil library to introspect code.

28 questions
1
vote
1 answer

fxcop fails because of references on obfuscated assemblies

I need to run fxcop on a project that references an obfuscated commercial assembly (from dotnetremoting.com). Fxcop tries to load the obfuscated assembly and fails... I have got exactly the same problem with Mono Gendarme. It also tries to analyse…
Alexandre Victoor
  • 3,104
  • 2
  • 27
  • 27
1
vote
0 answers

EnsureLocalDisposalRule for XmlNodeList

When I run Gendarme 2.11 on my C#.NET project the following code triggers the EnsureLocalDisposalRule: XmlDocument myXmlDoc = this.GetXmlDoc(); foreach (XmlNode myNode in myXmlDoc.GetElementsByTagName("TAGNAME")) { ... does something with myNode…
mattumotu
  • 1,436
  • 2
  • 14
  • 35
1
vote
2 answers

EnsureLocalDisposalRule of Gendarme and WinForm

I have faced issue with the rule EnsureLocalDisposalRule when my code is incompatible with the rule. Example of code: Form myForm = new myForm { MdiParent = this }; myForm .Show(); It is brakes the rule and I corrected it like this Example of…
Galkin
  • 791
  • 2
  • 9
  • 25
1
vote
1 answer

Protobuf-net Gendarme Errors

Recently came across protobuf-net, awesome library. I ran it through gendarme and it came up with many performance notifications, e.g: Target: System.Int32 ProtoBuf.ProtoReader::ReadFieldHeader() Assembly: protobuf-net, Version=1.0.0.0,…
CanCan
  • 119
  • 6
1
vote
1 answer

Error 85 Argument 1: cannot convert from 'System.Reflection.ConstructorInfo' to 'Mono.Cecil.TypeReference'

Presently I am attempting to build Gendarme 2.10 using Visual Studio 2010. Here are some of the errors I'm receiving: Error 85 Argument 1: cannot convert from 'System.Reflection.ConstructorInfo' to 'Mono.Cecil.TypeReference' …
user8128167
  • 6,929
  • 6
  • 66
  • 79
1
vote
1 answer

Can Mono Gendarme run on source files?

I understood that tool only runs on .net assemblies. Is there any way to make it run on source files instead ? Even if it requires source modification , i would like to know the possibility. Thanks
nomi
  • 431
  • 1
  • 5
  • 12
0
votes
1 answer

ArgumentNullException, indexer and Gendarme rule error

I have the indexer and want to check if is it not null, and if it is then throw ArgumentNullException, but Gendarme sets the warning InstantiateArgumentExceptionCorrectlyRule: This method throws ArgumentException (or derived) exceptions…
msi
  • 3,202
  • 4
  • 27
  • 37
0
votes
1 answer

How to avoid a "DisposableFieldsShouldBeDisposedRule" defect on fields I don't want to dispose?

There is a IDisposable which contains a field for the Logger: class DoesNotDisposeMember : IDisposable { public IDisposable Logger { get; set; } public void Dispose () { logger = null; } } Gendarme reports that there is a…
andreas
  • 299
  • 3
  • 9
0
votes
0 answers

C# Class extended implements the interface method and Gendarme rise ParameterNamesShouldMatchOverriddenMethodRule

I having the next problem, I have a class that extends another class and implements and interface. The interface defines a method which is implemented in the extended class, with exactly the same parameters name. The thing is that Gendarme rise a…
Iskariote
  • 11
  • 4
0
votes
0 answers

How to use Mono.Gendarme on CentOS7?

I can't find way to begin using Gendarme on my CentOS7 virtual machine. Gendarme documentation: Gendarme is part of mono-tools and is available on most recent Linux distributions But commands below do nothing: gendarme man gendarme I tried to…
Kostya Vyrodov
  • 6,257
  • 5
  • 23
  • 34
0
votes
1 answer

Running Gendarme after copying Mono.Cecil.Mdb.dll into mono/lib/gendarme/ causes an error

The Gendarme installation (v3.10.0.0) on my machine CentOS (release 6.5 Final) was unable to report line numbers. Upon some searching I found that Mono.Cecil.Mdb.dll was missing in the installation as suggested in the FAQs After doing some search on…
Saqib Shamsi
  • 522
  • 6
  • 15
0
votes
1 answer

Integrating Gendarme reports into SonarQube

I'd like to import gendarme reports into sonarqube. A sonar-csharp-gendarme-plugin existed once for this purpose, but seems to have been abandoned. Is there any replacement?
Murray
  • 1,948
  • 1
  • 12
  • 18
0
votes
1 answer

Does Asp.net MVC ActionResult implements IDisposable

Am getting gendarme issues on my MVC 5 Application in all the public methods stating "A method of an IDisposable type does not throw System.ObjectDisposedException." As far as i know most of the .net resources(Managed resources) by default implement…
Peru
  • 2,871
  • 5
  • 37
  • 66
1
2