-
Notifications
You must be signed in to change notification settings - Fork 435
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
rustdoc: respect error_format config #2166
Conversation
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.
Hi, thanks for the PR! Can you provide a bit more context here as well as a unit test of sorts?
The context is that we have automation using the output of rustdoc that uses json error format. We used to use extra rustc flags to pass I'll see when I can find some time to work on a unit test, but this isn't urgent to merge since we run a patched version. |
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.
In https://github.com/bazelbuild/rules_rust/blob/0.27.0/test/unit/rustdoc/rustdoc_unit_test.bzl you should be able to add a test that hard codes some value for //:error_format
that you should be able to assert made it's way into the resulting action.
Does that seem reasonable?
Thanks for the pointer! I've added a test - is that what you had in mind? |
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 is perfect, thank you!
This makes it easier to make a test ensuring rustdoc doesn't emit warnings.