-
Notifications
You must be signed in to change notification settings - Fork 888
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
Format diff line to be easily clickable #5971
Conversation
Thanks! I've tested this out in VSCode and it works! Just wondering, does it make sense to leave the trailing colon |
I can take it or leave it on that. The colon indicates that this message belongs to the following error, so I think it's worthwhile. That said, build errors from cargo build / rustc don't have the colon (but they do have some shiny colors to highlight the line with the clickable file link. The other thing worth considering here is whether to drop the full path and just leave the project root path e.g. compare:
vs:
You might also consider changing the message to be more explicit about what the diff represents to make it clearer to newer contributors when the format check is called deep in some CI process. e.g. something like:
|
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.
After our discussion I'm feeling good about making this change.
Instead of {filename} at {line}, use {filename}:{line} as this is a format that many editors allow to be clicked to navigate directly to the line.
f17fa0a
to
a0bc431
Compare
Instead of {filename} at {line}, use {filename}:{line} as this is a
format that many editors allow to be clicked to navigate directly to the
line.
This is a small papercut issue. I like being able to Cmd+Click a filename and navigate directly to the problematic code when I'm running
rustfmt check
.