Skip to content

Implement analyzer that suggests using builder.Services to ConfigureServices method#42356

Merged
BArthur1972 merged 12 commits into
dotnet:mainfrom
BArthur1972:update-analyzers
Jun 29, 2022
Merged

Implement analyzer that suggests using builder.Services to ConfigureServices method#42356
BArthur1972 merged 12 commits into
dotnet:mainfrom
BArthur1972:update-analyzers

Conversation

@BArthur1972
Copy link
Copy Markdown
Contributor

@BArthur1972 BArthur1972 commented Jun 22, 2022

Implement analyzer for issue: #35817 that warns the user to use builder.Services instead of builder.services.ConfigureServices.

Description

This analyzer warns the user when they use builder.Host.ConfigureServices or builder.WebHost.ConfigureServices and suggests using builder.Services instead.

Fixes #35817

@BArthur1972 BArthur1972 requested a review from Pilchie as a code owner June 22, 2022 23:08
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jun 22, 2022
@dnfadmin
Copy link
Copy Markdown

dnfadmin commented Jun 22, 2022

CLA assistant check
All CLA requirements met.

Comment thread src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs Outdated
…riptors.cs

Co-authored-by: Safia Abdalla <safia@safia.rocks>
Comment thread src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs Outdated
…riptors.cs

Co-authored-by: Safia Abdalla <safia@safia.rocks>
@BArthur1972 BArthur1972 merged commit 36f0f25 into dotnet:main Jun 29, 2022
@ghost ghost added this to the 7.0-preview7 milestone Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixer/Analyzer: Suggest rewriting builder.Host.ConfigureServices to builder.Services

3 participants