aspnetcore
aspnetcore copied to clipboard
Cleanup Mvc Analyzers
Minor code cleanup.
- Renaming of all analysis contexts to just
contextis intentional, and the shadowing is intentional. This is a common pattern in roslyn analyzers to avoid usage of outer contexts when they shouldn't be used. One common issue is accidentally usingouterContext.CancellationTokeninstead ofinnerContext.CancellationToken. The namecontextis also shorter :) - Removed unnecessary
refinAttributesShouldNotBeAppliedToPageModelAnalyzer. - Minor changes to
ActualApiResponseMetadataFactory:- Fixed a doc comment.
- Removed unnecessary conditions that are already handled
- Avoid unnecessary semantic model calls.
- Cleanup unreachable conditions in codefix providers.
Thanks for your PR, @Youssef1313. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
@JamesNK Want to take a look at this as well?
This merge is long overdue but thank you, @Youssef1313!