-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add an analyzer that complains when using using model binding attributes with a minimal action delegate #35359
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
src/Framework/Analyzer/src/MinimalActions/DiagnosticDescriptors.cs
Outdated
Show resolved
Hide resolved
* [x] Complain when using MVC binding attributes with minimal action * [x] Complain if a route parameter is not used or cannot be bound.
61a276b
to
6561769
Compare
src/Framework/Analyzer/src/MinimalActions/DiagnosticDescriptors.cs
Outdated
Show resolved
Hide resolved
src/Framework/Analyzer/test/MinimalActions/DisallowMvcBindArgumentsOnParametersTest.cs
Show resolved
Hide resolved
src/Framework/Analyzer/test/MinimalActions/RouteAttributeMismatchTest.cs
Outdated
Show resolved
Hide resolved
src/Framework/Analyzer/test/MinimalActions/RouteAttributeMismatchTest.cs
Outdated
Show resolved
Hide resolved
6561769
to
f2a1401
Compare
There was a problem hiding this 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.
src/Framework/Analyzer/src/MinimalActions/DiagnosticDescriptors.cs
Outdated
Show resolved
Hide resolved
/backport to release/6.0-rc1 |
Started backporting to release/6.0-rc1: https://github.com/dotnet/aspnetcore/actions/runs/1145070080 |
@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! |
…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]>
Fixes #35088