Skip to content
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

How to install/run the cargo-rustdoc-clippy #2

Closed
jmcnamara opened this issue Apr 5, 2023 · 3 comments
Closed

How to install/run the cargo-rustdoc-clippy #2

jmcnamara opened this issue Apr 5, 2023 · 3 comments

Comments

@jmcnamara
Copy link

I wanted to run clippy on code examples in rustdoc and came across your cargo-rustdoc-clippy at rust-lang/rust#56232

Could you give some guidance on how to install/run it? What I've tried so far:

I installed(??) it and made it executable as follows on macOS Ventura 13.2.1:

$ cp ~/Downloads/cargo-rustdoc-clippy.txt ~/.cargo/bin/cargo-rustdoc-clippy
$ chmod +x ~/.cargo/bin/cargo-rustdoc-clippy

It runs but gives errors on each file/example in this repo:

$ cargo +nightly rustdoc-clippy
    Finished test [unoptimized + debuginfo] target(s) in 0.03s
   Doc-tests rust_xlsxwriter

running 195 tests
error: multiple input filenames provided (first two filenames are `` and `-`)

error: multiple input filenames provided (first two filenames are `` and `-`)

error: multiple input filenames provided (first two filenames are `` and `-`)
...

Any hints on what I am going wrong or missing?

And thanks for making this available.

@Nemo157
Copy link
Owner

Nemo157 commented Apr 5, 2023

Ah whoops, my latest change to make it support spaces in args broke running it without any args, for now cargo rustdoc-clippy -- -- -Dwarnings will work (and it's sort of necessary to use in order to get a summary of which examples fail at the end anyway). I'll probably push an updated version soon that fixes it.

@Nemo157
Copy link
Owner

Nemo157 commented Apr 5, 2023

That was actually easier to fix than I expected aeaa138.

@Nemo157 Nemo157 closed this as completed Apr 5, 2023
@jmcnamara
Copy link
Author

Thank you. That works and is just what I was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants