Skip to content

Conversation

@pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Aug 15, 2021

  • Complain when using MVC binding attributes with minimal action

Fixes #35088

* [x] Complain when using MVC binding attributes with minimal action
* [x] Complain if a route parameter is not used or cannot be bound.
@pranavkm pranavkm changed the title Add some analyzers Add an analyzer that complains when using using model binding attributes with a minimal action delegate Aug 18, 2021
@pranavkm pranavkm marked this pull request as ready for review August 18, 2021 18:18
@pranavkm pranavkm requested review from a team, Pilchie, dougbu and javiercn as code owners August 18, 2021 18:18
Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to do full end to end tests? Otherwise we're just hoping the packaging works correctly and we don't accidentally break it in the future.

@pranavkm pranavkm enabled auto-merge (squash) August 18, 2021 22:07
@BrennanConroy
Copy link
Member

/backport to release/6.0-rc1

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@BrennanConroy backporting to release/6.0-rc1 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Add some analyzers
Applying: Fixup
Using index info to reconstruct a base tree...
M	src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj
CONFLICT (content): Merge conflict in src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj
Removing src/Framework/Analyzer/test/MinimalActions/RouteAttributeMismatchTest.cs
Removing src/Framework/Analyzer/src/MinimalActions/RouteAttributeMismatch.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Fixup
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@pranavkm pranavkm merged commit 6475919 into main Aug 19, 2021
@pranavkm pranavkm deleted the prkrishn/analyzer branch August 19, 2021 00:26
@ghost ghost added this to the 7.0-preview1 milestone Aug 19, 2021
BrennanConroy pushed a commit that referenced this pull request Aug 19, 2021
…tes with a minimal action delegate (#35359)

* [x] Complain when using MVC binding attributes with minimal action

Fixes #35088
wtgodbe pushed a commit that referenced this pull request Aug 19, 2021
…tes with a minimal action delegate (#35359) (#35480)

* [x] Complain when using MVC binding attributes with minimal action

Fixes #35088

Co-authored-by: Pranav K <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an Analyzer to help users understand acceptable attributes for Minimal APIs

5 participants