You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for opening this issue. Diesel cli emits a @generated which should instruct rustfmt to ignore this file. If that doesn't work this seems to be more a rustfmt issue and should be reported there.
That written: I'm open to accept a PR that emits the correct formatting in this case. For larger schemas that already works but for only a few tables that doesn't seem to be perfect.
If that works reliably with the patching mechanism it would be acceptable to just use rustfmt for this as long as its failure tolerant if rustfmt is not installed.
Setup
Versions
Feature Flags
Problem Description
The
schema.rs
file created by diesel-cli when running a migration doesn't always comply with rustfmtWhat are you trying to accomplish?
I'm trying to use the diesel-cli to generate the migrations and the
schema.rs
fileWhat is the expected output?
Running
cargo fmt -- --check
should produce no errors.What is the actual output?
Depending on the number of tables, the
schema.rs
file is not formatted properly and thus resulting in an error when running cargo fmtAre you seeing any additional errors?
No
Steps to reproduce
Setup a basic diesel and cargo project
Generate a migration
Put the following into your `migrations/XXX_migration1/up.sql
main.rs
Output:
You can checkout a test repository here
Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: