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
First of all it's a matter of taste: I would write the code
ScopeGuard guard([&]() {
close();
});
This is also much easier to read and debug.
Think the outcome of the rule is not wrong: There are two statements in a line? The code inside a lamba are also statements?
Third remark: I recommend not to use these build-in static code analysis checks. We will deprecate and remove them. It's better to use an external tool and forward the resulting report, see also #1613.
Following line will cause error.
With lambda expressions it should be allowed to have two ; on a line.
Found this on google: https://rules.sonarsource.com/c/RSPEC-122. Don't know how that relates to this community.
The text was updated successfully, but these errors were encountered: