You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would like to see Roslyn warn if you've got a System.Threading.SpinLock in a readonly field, as the lock will not function correctly in this case, and the exceptions that are thrown can be difficult to interpret (for example).
I think this'd be a good one to catch.
Languages applicable:
I'm only familiar with C#.
Code example that the analyzer should report:
readonly SpinLock someLock;
// presence of initializer at declaration point does not matter.
Where the suggested fix is to remove the readonly attribute.
The text was updated successfully, but these errors were encountered:
Brief description:
Would like to see Roslyn warn if you've got a
System.Threading.SpinLock
in areadonly
field, as the lock will not function correctly in this case, and the exceptions that are thrown can be difficult to interpret (for example).I think this'd be a good one to catch.
Languages applicable:
I'm only familiar with C#.
Code example that the analyzer should report:
Where the suggested fix is to remove the
readonly
attribute.The text was updated successfully, but these errors were encountered: