-
Notifications
You must be signed in to change notification settings - Fork 711
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
Integrate rustfmt into the build system and/or Continuous Integration #285
Comments
I guess the goal would be to take some of the changes, ignore some and add attributes to make Can you give some examples of things that should not to be changed? This is the diff from running |
The things I most strongly object to are mentioned in my review comments in #385 (review). In general I very much like the idea of rustfmt, but I would like to see rustfmt fixed and/or made more flexible to output formatting that is optimized for minimizing the number of lines of code and optimized for the 80-column width, due mostly to limitations of my code reviewing system. Unless/until that happens I think it makes less sense to try to reformat more than what's already been done, because people won't generally be able to do One thing I'd also like to consider is reformatting everything to use 2 space indent, to compensate for the 80-column width rule. I've always wanted to use 2-space indent but when I started Rust programming I had the impression that nobody did that. Now I know I'm not the only one so i think it makes sense to go ahead with it. Regarding C-style comments like |
I'm having evil thoughts of running
I'll do a small PR to change that. |
BTW, currently |
I'm going to make this issue about just rustfmt, since that's the most-discussed thing in this. I filed #448 to track automatically verifying we pass Clippy checks, which is something I think we can do sooner and separately from rustfmt. |
Thanks!
I filed https://github.com/Manishearth/rust-clippy/issues/1508. Regarding the reformatting to switch to two-space indent, I think that should be a separate issue. And I'd like to get through my PR backlog before tackling it. |
I did a quick look on C-style comments and they were all of the form |
[Edit: This is just about rustfmt now; Clippy integration is now #448]
#277 shows that Clippy is useful. We should integrate it into the build system and/or the continuous integration so that we can catch problems before they get committed.
On Continue Integration, Clippy checks should run AFTER the tests. I think it would be too annoying to have a push fail to even run the tests because of a formatting error.
It's probably best to use the
cargo clippy
subcommand instead of the compiler plugin, as I suspect it would be less brittle and more likely to work across stable/beta/nightly Rust.The text was updated successfully, but these errors were encountered: