Skip to content

Handle methods that never return in Api Analyzers #48623

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

Conversation

Briaoeuidhtns
Copy link
Contributor

Handle methods that never return in Api Analyzers

Description

Fixes a null ref when an action method always throws and has no return statement.

Fixes #48528

@Briaoeuidhtns Briaoeuidhtns requested a review from a team as a code owner June 5, 2023 19:16
@ghost ghost added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels community-contribution Indicates that the PR has been added by a community member labels Jun 5, 2023
@ghost
Copy link

ghost commented Jun 5, 2023

Thanks for your PR, @Briaoeuidhtns. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Briaoeuidhtns
Copy link
Contributor Author

@dotnet-policy-service agree company="The Code Corporation"

@mkArtakMSFT mkArtakMSFT removed the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jun 6, 2023
@captainsafia
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@captainsafia captainsafia 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 for this contribution, @Briaoeuidhtns! 🙇🏽‍♀️

@mitchdenny
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mitchdenny mitchdenny added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates and removed old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels labels Jun 7, 2023
@mitchdenny mitchdenny merged commit 97acf9d into dotnet:main Jun 7, 2023
@ghost ghost added this to the 8.0-preview6 milestone Jun 7, 2023
@Briaoeuidhtns Briaoeuidhtns deleted the 48528-fix-null-ref-on-action-never-returns branch June 7, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mvc.Api.Analyzers.ApiConventionAnalyzer throws ArgumentNullException when action doesn't return
5 participants