-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
fix: Display offset for filenames with spaces #551
Conversation
I think if you delete that #[rustfmt::skip] that was in the middle of that function. and run rustfmt, it might fix the build. that's what I was trying to do when i accidentally closed ur last PR. (that was obviously already there.. not your fault, I was just trying to clean it up and it so happened to be on your fork because you're touching this part of the code) |
I don't really understand what the checks are supposed to check ? Is there a way for me to check on my machine directly without having to push to launch a job ? EDIT: Oh I'm actually just stupid I didn't realize rustfmt was a command... Testing that |
So much for me trying to format the code nicely myself xD |
After further review I believe we also need to check for if file.name.contains(' ') || file.name.contains('\'') { 2 } else { 0 } as a file name with a quote in it will cause it to be quoted as well. This is found in the check in src/options/escape.rs let needs_quotes = string.contains(' ') || string.contains('\''); After that LGTM 👍 |
e9b2804
to
eaddf8b
Compare
Also fixes #515 I believe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I can't be of more help with this currently I'm a bit busy irl |
I didn't realize there was a different code for detailed outputs, it should be good now if I didn't mess up the formatting yet again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks 👍
Yeah we should probably add a test for that |
Indeed. The current tests all have filenames without spaces or quotes, and none of them are longer than a few characters. Definitely not ideal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to fix it, and integration tests pass, LGTM thanks for fixing this
@cafkafk @guillaumeboehm this only fixes the issue when quotes are being displayed. After this patch, using --no-quotes now results in files being offset to the left: |
Oh I didn't see that option... I'll fix this when I get home. |
I got a PR ready unless you'd like to submit one @guillaumeboehm |
No it's all good if you have one ! Thanks ^^ |
Reopening #548 in different issue.