Skip to content

Commit

Permalink
add edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-epure-sonarsource committed Feb 28, 2023
1 parent 43475a2 commit 361b512
Showing 1 changed file with 34 additions and 0 deletions.
Expand Up @@ -185,3 +185,37 @@ void Foo()
}
}
}

public class EdgeCaseWithLongCommonPaths
{
private static void StaticMethod() { } // Noncompliant {{Move this method inside 'MiddleTwo'.}}

public class MiddleOne
{
public class MiddleTwo
{
public class Foo
{
public class FooLeaf
{
public void Method() => StaticMethod();
}
}

public class Bar
{
public void Method() => StaticMethod();
public class BarLeaf
{
public void Method() => StaticMethod();
}
}
}
}
public class MiddleTwo {
public void StaticMethod()
{
}
public void Method() => StaticMethod();
}
}

0 comments on commit 361b512

Please sign in to comment.