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
Hi! I couldn't help but notice that the codebase doesn't use rustfmt. Are there any specific reasons for that? If there are limitations in the rustfmt itself that could be addressed it would be useful to hear about them upstream.
Feel free to close this ticket as off-topic.
The text was updated successfully, but these errors were encountered:
Thanks for looking at this. My non-use was most ignorance of the tool. I just tried it and I like a lot of what it corrects, but I found a few things that make me hesitant to use it:
I sometimes try to align comments like
let foo = "short string"; // first comment
let bar = "this is a much larger string"; // second comment
rustfmt wants to make the comments tight. I didn't see an option to avoid this. In fact, I'd like to see an option that would align comments. It would need some extra option to control how many lines it should look at to do the alignment. For example, if there was a line between the two lines above, I might still want to align the comments. However, probably not if there was a 10 line gap.
2. I sometimes add spaces or break something across lines for clarity. Is there a way to tell rustfmt to ignore the following statement?
3. rustfmt wants to add space around operators. Normally good, but here's an example where I don't like it:
In the way I wrote it, I find it makes the arguments clearer than when they get spaced out in the second line. Again, being able to easily override rustfmt for this line would be helpful.
Hi! I couldn't help but notice that the codebase doesn't use rustfmt. Are there any specific reasons for that? If there are limitations in the rustfmt itself that could be addressed it would be useful to hear about them upstream.
Feel free to close this ticket as off-topic.
The text was updated successfully, but these errors were encountered: