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
{{ message }}
Repository navigation
cargo fmt doesn't format files in sub-directories in tests #1820
I think there are two kinds of cargo test - unit tests, which cargo fmt should reach if they are reachable via module includes (I think this is fine); and integration tests, which are not formatted at all (which we should address, though I'm not really sure how).
Activity
brauliobz commentedon Sep 27, 2017
cargo fmtonly formats test code that is reached bycargo test, which basically follows themodinclusions, from what I could see.I tested the following scenario:
sub_test.rs is formatted only when:
mod subdir;;mod sub_test;.Is this behavior really desirable?
nrc commentedon Sep 29, 2017
I think there are two kinds of
cargo test- unit tests, whichcargo fmtshould reach if they are reachable via module includes (I think this is fine); and integration tests, which are not formatted at all (which we should address, though I'm not really sure how).calebcartwright commentedon Sep 4, 2019
Just a heads up that I've taken a pass at this and now have a working implementation locally.
Will open a PR for discussion/review/etc. within the next day or two