Enable single file analyzer in the runtime (#50894)
Summary: Enables single file analyzer in the runtime by adding the ILLink.Analyzers package and the property EnableSingleFileAnalyzer equals to true Deletes entries IL3000 and IL3001 in the CodeAnalysis.ruleset so the analyzer can actually produce these warnings otherwise the analyzer execution would be skipped. *Note*: tests warnings are controlled by CodeAnalysis.test.ruleset (this PR adds IL3002 to the CodeAnalysis.test.ruleset to disable the warning on tests) Resolve warnings on single file dangerous patterns by: - Annotating incompatible single file patterns with RequiresAssemblyFiles - Suppressing the warning (because there is code that handles the incompatible code) - Fixing the issue on code (remove the incompatible code and replace it with something that won't fail) - Opening an issue to track fix and either annotate/suppress the current behavior
Showing
想要评论请 注册 或 登录