Skip to content

Commit

Permalink
Code review 3
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Feb 24, 2023
1 parent 79ee45e commit f27da3b
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -2,9 +2,17 @@
// ^^^^^^^^^^
lock (MethodReturningString()) { } // Noncompliant
lock (new object()) { } // Noncompliant
lock (staticReadonlyField) { }
lock (staticReadWriteField) {} // Noncompliant

string MethodReturningString() => "a string";

partial class Program
{
static readonly object staticReadonlyField = new();
static object staticReadWriteField = new();
}

class ClassNestedAtTopLevel
{
readonly object readonlyField = new();
Expand Down

0 comments on commit f27da3b

Please sign in to comment.