1 Replies Last post: Jun 3, 2012 2:25 PM by Andrey Serebryansky  
Tim Sirmovics Newbie 8 posts since
Jun 1, 2012
Currently Being Moderated

Jun 2, 2012 4:28 AM

Inspection 'Redundant name qualifier' (C#) and StyleCop rule SA1126

Hi,

 

(Reference: http://stylecop.codeplex.com/discussions/357597)

 

Recently  the Stylecop project updated rule SA1126 to flag calls to static base  class methods which did not have the name of the base class before the  method call.

 

ie. StaticMethod() should be BaseClass.StaticMethod().

 

The  problem is that this is then flagged as a redundant name qualifier with  R#. Unfortunately, the scope of the 'Redundant name qualifier'  inspection in R# is such that if it is disabled, a whole host of actual  redunant name qualifiers will not be picked up.

 

 

Is  it possible to have this inspection extended, to ignore the class name  qualifier for static methods that are not in the current class?

Andrey Serebryansky JetBrains 2,900 posts since
Jan 12, 2005
Currently Being Moderated
Jun 3, 2012 2:25 PM in response to: Tim Sirmovics
Re: Inspection 'Redundant name qualifier' (C#) and StyleCop rule SA1126

Hello Tim

     I've logged an issue in our tracker: http://youtrack.jetbrains.com/issue/RSRP-307114 and you're welcome to vote for it. Thank you!

 

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

More Like This

  • Retrieving data ...