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
Migrations: Make generated code play well with StyleCop #7189
Comments
The implicit modifiers in the |
@patriksvensson we'd love to take a PR on this one. Here is what we think should be done...
|
Putting on the backlog, but we'd take the PR into 1.2 if it is ready in time. |
@rowanmiller I can submit a PR for this, but I'm not sure when 1.2 is due (the milestone gives me no information about this). |
@patriksvensson if you can get it in sometime in the next month or so that would give us time to have it in one of the pre-releases for the next release. |
@rowanmiller Sounds good to me. I have plenty of free time the next month or so, so sign me up for this one. |
Here's where to start digging in: CSharpMigrationsGenerator 😉 |
Hi, I don't want to re-open this issue but I wonder if it's somehow related to this one, which I encountered while running migrations during a publish step: StyleCop/StyleCop#201 Any insights or suggestions would be appreciated. |
Doesn't seem related |
Is there a specific reason this PR was reverted (or, rather, the functionality was removed)? I'm seeing my analyzers light up like a Christmas tree after revisiting the project after a couple of years, and the |
Looks like it's still there:
|
Odd, because it's not being added to new migrations. |
Steps to reproduce
Add a new migration
The issue
Let me start with saying "Thanks for an awesome project".
This isn't a huge problem, but for all of us that uses StyleCop, adding a new migration creates a lot of warnings (and errors for release builds where warnings-as-errors are enabled).
Migrations/MyAppDbContextModelSnapshot
are not ordered alphabetically.Migrations/20161205224611_MyMigration.cs
are not ordered alphabetically.Migrations/20161205224611_MyMigration.Designer.cs
are not ordered alphabetically.Migrations/MyAppDbContextModelSnapshot
class is implicit.Migrations/20161205224611_MyMigration.Designer.cs
class is implicit.I would be happy to provide a PR to fix this if you think it's worth doing.
Another solution to this would be to add the standard
<auto-generated>
header to the generated files.Further technical details
EF Core version: (found in project.json or packages.config)
Operating system: Windows 10
Visual Studio version: VS 2015
The text was updated successfully, but these errors were encountered: