It looks like some C# 8 features and tuples in general causes problems on sonarqube rules.
This is recognized as error:
static State ChangeState(State current, Transition transition, bool hasKey) =>
(current, transition, hasKey) switch
{
(Opened, Close, _) => Closed,
(Closed, Open, _) => Opened,
(Closed, Lock, true) => Locked,
(Locked, Unlock, true) => Closed,
_ => throw new InvalidOperationException($"Invalid transition")
};
Same with this (S2583):
UserProfile profile = null;
UserRights rights = null;
....
(profile ,rights) = await Task.Run(() => ...
The assignment is not recognized.
Version 8.3.0.14607
Cheers,
Marco