Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs and typos #2168

Merged
merged 2 commits into from Oct 25, 2022
Merged

Conversation

YegorStepanov
Copy link
Contributor

No description provided.

@@ -548,7 +548,7 @@ private static (BenchmarkRunInfo[], List<ValidationError>) GetSupportedBenchmark
.Where(infos => infos.BenchmarksCases.Any())
.ToArray();

return (benchmarkRunInfos, validationErrors);
return (runInfos, validationErrors);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emanuel-v-r, is it a bug?
It is strange that the IDE did not highlight you that the variable benchmarksRunInfo is not used

Open "files changed" to see the full method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks like it's a bug, thank you for fixing it.
Seems that I've missed it.

We could add an .editorconfig to the repo, and start treating such scenarios as an "error" so that we don't miss it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you use Visual Studio and it didn't show that the variable was not in use?

Today, I tried migrating from ruleset to .editorconfig and got 700 warnings (currently they treated as errors).
It is definitely necessary to migrate to it, but this will require cleaning the solution - most PRs will be "broken"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, If I had noticed I would obviously have it fixed.
Probably we should try some rule by rule approach, instead of having it all at once

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*I mean migration to dotnet/runtime .editorconfig with some BenchmarkDotNet modification.

You are right, it is better to do it in several stages.

Сurrently, most of the enabled analyzers are for Rider/Resharper only, they don't work in VS.

PS this will finally fix that one user adding an empty last line and in the next PR another user removes it.

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @YegorStepanov !

@adamsitnik adamsitnik merged commit c02c3d8 into dotnet:master Oct 25, 2022
@adamsitnik adamsitnik added this to the v0.13.3 milestone Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants