-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enable analyzers for mono/netcore #34052
Conversation
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
Show resolved
Hide resolved
...no/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorOnTypeBuilderInst.cs
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/TypedReference.cs
Outdated
Show resolved
Hide resolved
ce71b37
to
3dc2ad8
Compare
I get the same locally. I pushed a change to disable it pending #33867 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one question.
The test failure is the known issue: #34045 |
@stephentoub by the way how did you run these auto-fixers? |
Opened the solution in VS, and used Build | Run Code Analysis on Solution to force all of the analyzers to run promptly. Then for each category, selected one of the warnings from the error list, triggered its fixer from the lightbulb (ctrl-period), and selected Solution when determining the scope to which to apply it. Repeated that for each kind of warning. Then also hacked the .csproj with manually specifying TargetsLinux/OSX/Windows and repeated the process, to cover files only in specific builds. On that note, how do I build mono's corelib for Linux and macOS? I was able to specify a property on the command-line, and it output the assembly into the relevant location, but it appeared to still be building the Windows source code. |
As far as I know everything should use the |
That appears to work. No idea what I was doing differently before :) |
From a code review point of view, consider making a commit after each fixer. That way I can do only brief review of eg "remove unused usings" and focus on other stuff. |
cc: @akoeplinger, @marek-safar
This is mostly just running auto-fixers for the various violated rules. In just a few places, I manually intervened.