Domanda

I use Resharper's StyleCop integration when I am writing code to give me consistently styled code. I am using the full standard rule set.

This leads to Resharper regularly reminding me about

SA1101: Prefix local call with "this.": The call to XXX must begin with the 'this.' prefix to indicate that the item is a member of the class

Once I've finished my edits and got Resharper happy, I check in and TeamCity's Code Inspections will run and tell me

Redundancies in Code 
  Redundant 'this.' qualifier (xxxx)
FileName.cs
22: Qualifier 'this.' is redundant
23: Qualifier 'this.' is redundant
33: Qualifier 'this.' is redundant
etc

I know I can always disable the SA1101 error in every project in every solution or in every developers global file, but ideally I'd prefer to keep the standard and disable the checking of this error in Code Inspections.

Any idea how? Or any alternative ideas?

È stato utile?

Soluzione

See http://confluence.jetbrains.com/display/TCD7/Inspections+(.NET)#Inspections%28.NET%29-Additionaloptions for instructions on pointing the TeamCity inspection runner at alternate ReSharper settings.

The settings file you provide should disable the "redundant this." inspection. If you're not sure how to do this, take a look at your client-side ReSharper settings file, which presumably already has it disabled.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top