Add 'Make anonymous function static' feature#73012
Add 'Make anonymous function static' feature#73012CyrusNajmabadi merged 15 commits intodotnet:mainfrom DoctorKrolic:make-anonymous-function-static
Conversation
|
@CyrusNajmabadi PTAL |
CyrusNajmabadi
left a comment
There was a problem hiding this comment.
LGTM. Let me know if you want to fixup the tests or not. I'm ok with them going in in the current state.
|
Thanks! |
|
Need failed pipelines restart here |
|
CI failure is legit: Sorry the UI is unclear here. |
|
you just need to add a line to that file. our docs team will then doc this in the future. |
Head branch was pushed to by a user without write access
|
CI failed again... This time doesn't seem to be a legit failure |
|
Thanks. Have notified the test owner of hte flakeyness issue. |
|
Thanks! |
Update .NET SDK to the latest released version and disable `rollForward`. Updates to the .NET SDK feature band can introduce new / updated analyzers (for instance, 8.0.400 adds [IDE0320](dotnet/roslyn#73012)). As a result, updating the feature band isn't "safe" to do from a build reproducibility perspective. It will also conflict with #166. That means the roll forward options available to us are: - `patch` - `latestPatch` - `disable` However, GitHub Actions don't support these options (tracked by actions/setup-dotnet#448). Thus, the only `rollForward` strategy that currently does the same thing locally and in CI is `disabled`. Once 448 is fixed, we can / should probably switch to `latestPatch` (tracked by #171). This 'gotcha' is also added to the SquiggleCop documentation [here](https://github.com/MattKotsenas/SquiggleCop?tab=readme-ov-file#common-sources-of-baseline-mismatches).
|
Did this feature make it into 17.11 (as suggested by the assigned milestone)? Because I'm currently running 17.11.4 and SDK 8.0.400 and I can't get the analyzer to show up with the "before" examples in #45832 |
|
This analyzer is hidden by default so that existing code doesn't get too noisy. If you want this diagnostic to be shown in the diagnostic list, upgrade its severity to 'suggestion' or higher |
|
I did test it with this .editorconfig setting: Code: public void M(Func<int, int> func) { }
public void T()
{
M(x => x + 1); // before
M(delegate (int x) { return x + 1; }); // before
} |
Closes: #45832